@titaui/pc 1.7.29 → 1.7.30

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.
@@ -37,7 +37,7 @@
37
37
 
38
38
  .titaui-cascader-popup .rc-cascader-menu-item-active {
39
39
  background: unset;
40
- color: #2879ff;
40
+ color: #2879ff !important;
41
41
  }
42
42
 
43
43
  .titaui-cascader-popup .rc-cascader-menu-item {
@@ -128,15 +128,18 @@ var Inform = function Inform(props) {
128
128
  }
129
129
  } else if (item.objUrl) {
130
130
  window.open(item.objUrl);
131
+ } else if (item.objType === _constant.informType.Okr) {
132
+ var url = item.content.match(/(http[s]?:\/\/([\w-]+.)+([:\d+])?(\/[\w-\.\/\?%&=]*))/g);
133
+ window.open(url, '_blank');
131
134
  } else {
132
135
  var reg = /href='.*?(?=')/g;
133
- var url = '';
136
+ var _url = '';
134
137
  item.content.replace(reg, function ($0) {
135
- url = $0.slice(6);
138
+ _url = $0.slice(6);
136
139
  });
137
140
 
138
- if (url) {
139
- window.open(url, '_blank');
141
+ if (_url) {
142
+ window.open(_url, '_blank');
140
143
  }
141
144
  }
142
145
  }
@@ -27,7 +27,9 @@ var informType = {
27
27
  //查看详情
28
28
  "daily": 55,
29
29
  //日报月报周报
30
- "todayJob": 81 //进入今日工作
30
+ "todayJob": 81,
31
+ //进入今日工作
32
+ "Okr": 0 //Okr
31
33
 
32
34
  };
33
35
  exports.informType = informType;
@@ -14,8 +14,15 @@ var preCls = 'weekly-report-card-board';
14
14
  function Board(_ref) {
15
15
  var percent = _ref.percent;
16
16
  return /*#__PURE__*/_react["default"].createElement("div", {
17
+ style: {
18
+ position: 'relative',
19
+ paddingBottom: 1
20
+ }
21
+ }, /*#__PURE__*/_react["default"].createElement("div", {
17
22
  className: preCls
18
23
  }, /*#__PURE__*/_react["default"].createElement("div", {
24
+ className: preCls + '__cover'
25
+ }), /*#__PURE__*/_react["default"].createElement("div", {
19
26
  className: preCls + '__done'
20
27
  }, /*#__PURE__*/_react["default"].createElement("div", {
21
28
  className: preCls + '__undone',
@@ -36,7 +43,9 @@ function Board(_ref) {
36
43
  }
37
44
  })), /*#__PURE__*/_react["default"].createElement("div", {
38
45
  className: preCls + '__center'
39
- }, /*#__PURE__*/_react["default"].createElement("div", null, percent, "%")));
46
+ }, /*#__PURE__*/_react["default"].createElement("div", null, percent, "%"))), /*#__PURE__*/_react["default"].createElement("div", {
47
+ className: preCls + '__cover--bottom'
48
+ }));
40
49
  }
41
50
 
42
51
  var _default = Board;
@@ -208,7 +208,7 @@ function Card(_ref, ref) {
208
208
  percent: Number(data.Complete)
209
209
  }), /*#__PURE__*/_react["default"].createElement("div", {
210
210
  className: preCls + "__comparison"
211
- }, data.Increase != '0' ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, "OKR \u5B8C\u6210\u5EA6", /*#__PURE__*/_react["default"].createElement("img", {
211
+ }, "OKR \u5B8C\u6210\u5EA6", data.Increase != '0' ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, " ", /*#__PURE__*/_react["default"].createElement("img", {
212
212
  className: preCls + "__direction",
213
213
  src: Number(data.Increase) > 0 ? require("./img/up.png") : require("./img/down.png"),
214
214
  alt: ""
@@ -5,13 +5,13 @@
5
5
  .weekly-report-card-wrapper {
6
6
  overflow: hidden;
7
7
  width: 336px;
8
- height: 548px;
8
+ height: 534px;
9
9
  border-radius: 24px;
10
10
  }
11
11
 
12
12
  .weekly-report-card-wrapper .weekly-report-card-content {
13
13
  position: relative;
14
- top: -66px;
14
+ top: -52px;
15
15
  left: -20px;
16
16
  transform: scale(0.9);
17
17
  }
@@ -32,7 +32,7 @@
32
32
  align-items: center;
33
33
  width: 375px;
34
34
  height: 710px;
35
- background: linear-gradient(180deg, #B7D5FF 0%, #186FFF 100%);
35
+ background: linear-gradient(180deg, #B7D5FF 0%, #186FFF 50%);
36
36
  }
37
37
 
38
38
  .weekly-report-card__title {
@@ -55,13 +55,14 @@
55
55
  flex-direction: column;
56
56
  align-items: center;
57
57
  width: 335px;
58
- height: 452px;
58
+ height: 422px;
59
59
  background: transparent;
60
60
  padding-top: 55px;
61
61
  border-radius: 12px;
62
62
  background-image: url("./img/body.png");
63
63
  background-size: 100% 100%;
64
64
  background-position-y: -1px;
65
+ box-sizing: content-box;
65
66
  }
66
67
 
67
68
  .weekly-report-card__avatar {
@@ -129,17 +130,19 @@
129
130
 
130
131
  .weekly-report-card-board__done {
131
132
  position: absolute;
132
- width: 154px;
133
- height: 154px;
133
+ width: 150px;
134
+ height: 150px;
134
135
  border-radius: 50%;
135
- background: linear-gradient(360deg, #2879FF 0%, #5B8FF9 50%);
136
+ background: linear-gradient(90deg, #2879FF 0%, #5B8FF9 50%);
136
137
  overflow: hidden;
138
+ top: 2px;
139
+ left: 2px;
137
140
  }
138
141
 
139
142
  .weekly-report-card-board__undone {
140
143
  position: absolute;
141
- left: -3px;
142
- bottom: 50%;
144
+ left: -5px;
145
+ bottom: 75px;
143
146
  width: 160px;
144
147
  height: 80px;
145
148
  background-color: #eaf1fe;
@@ -147,6 +150,26 @@
147
150
  transform: rotate(90deg);
148
151
  }
149
152
 
153
+ .weekly-report-card-board__cover {
154
+ width: 154px;
155
+ height: 154px;
156
+ position: absolute;
157
+ border-radius: 50%;
158
+ box-sizing: border-box;
159
+ border: 2px solid #fff;
160
+ z-index: 10;
161
+ }
162
+
163
+ .weekly-report-card-board__cover--bottom {
164
+ width: 154px;
165
+ height: 2px;
166
+ position: absolute;
167
+ bottom: 0;
168
+ box-sizing: border-box;
169
+ background-color: #FFF;
170
+ z-index: 10;
171
+ }
172
+
150
173
  .weekly-report-card-board__space {
151
174
  position: absolute;
152
175
  width: 2px;
@@ -232,7 +255,7 @@
232
255
  display: flex;
233
256
  align-items: center;
234
257
  justify-content: space-between;
235
- margin-top: 29px;
258
+ margin-top: 18px;
236
259
  }
237
260
 
238
261
  .weekly-report-card__statistics__item {
@@ -288,16 +311,16 @@
288
311
 
289
312
  .weekly-report-card__laba {
290
313
  position: absolute;
291
- left: 0;
292
- top: 118px;
314
+ left: 6px;
315
+ top: 108px;
293
316
  width: 94px;
294
317
  height: 65px;
295
318
  }
296
319
 
297
320
  .weekly-report-card__bofang {
298
321
  position: absolute;
299
- right: 0;
300
- top: 130px;
322
+ right: 4px;
323
+ top: 124px;
301
324
  width: 62px;
302
325
  height: 66px;
303
326
  z-index: 1;
@@ -327,6 +350,8 @@
327
350
  background-color: transparent;
328
351
  font-size: 14px;
329
352
  color: #FFF;
353
+ backdrop-filter: blur(2px);
354
+ background-color: rgba(255, 255, 255, 0.1);
330
355
  }
331
356
 
332
357
  .weekly-report-card__download:hover {
@@ -67,7 +67,7 @@ function WeeklyReportPreview(_ref) {
67
67
  position: "relative"
68
68
  }
69
69
  }, /*#__PURE__*/_react["default"].createElement("div", {
70
- className: (0, _classnames["default"])("tu-icon-circle", preCls + "__close"),
70
+ className: (0, _classnames["default"])(preCls + "__close"),
71
71
  onClick: onClose
72
72
  }), /*#__PURE__*/_react["default"].createElement("div", {
73
73
  style: {
@@ -172,7 +172,7 @@ function WeeklyReportModal(_ref4) {
172
172
 
173
173
  return (_window3 = window) === null || _window3 === void 0 ? void 0 : (_window3$Talent = _window3.Talent) === null || _window3$Talent === void 0 ? void 0 : _window3$Talent.app.vent.off('open-weekly-report-modal');
174
174
  };
175
- }, []);
175
+ }, [visible]);
176
176
  (0, _react.useEffect)(function () {
177
177
  if (!visible) return;
178
178
  var current = new Date();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@titaui/pc",
3
- "version": "1.7.29",
3
+ "version": "1.7.30",
4
4
  "nameCN": "",
5
5
  "description": "",
6
6
  "main": "src/index.js",
@@ -96,7 +96,10 @@ const Inform = (props) => {
96
96
  }
97
97
  } else if (item.objUrl) {
98
98
  window.open(item.objUrl);
99
- } else {
99
+ } else if (item.objType === informType.Okr) {
100
+ let url = item.content.match(/(http[s]?:\/\/([\w-]+.)+([:\d+])?(\/[\w-\.\/\?%&=]*))/g);
101
+ window.open(url, '_blank');
102
+ } else {
100
103
  const reg = /href='.*?(?=')/g;
101
104
  let url = '';
102
105
  item.content.replace(reg, ($0) => {
@@ -15,6 +15,7 @@ export const informType = {
15
15
  "details": 69, //查看详情
16
16
  "daily": 55, //日报月报周报
17
17
  "todayJob": 81, //进入今日工作
18
+ "Okr": 0, //Okr
18
19
  };
19
20
 
20
21
  export enum EObjType {
@@ -26,4 +27,5 @@ export enum EObjType {
26
27
  MileStone = 27, // 里程碑
27
28
  KanBan = 66, // 看板
28
29
  Remind = 8,//提醒
30
+
29
31
  }
@@ -7,7 +7,9 @@ const preCls = 'weekly-report-card-board'
7
7
 
8
8
  function Board({percent}: Props): ReactElement {
9
9
  return (
10
+ <div style={{position:'relative',paddingBottom:1}}>
10
11
  <div className={preCls}>
12
+ <div className={preCls+'__cover'}/>
11
13
  <div className={preCls+'__done'}>
12
14
  <div className={preCls+'__undone'}style={{transform:`rotate(${percent/100 * 180}deg)`}}/>
13
15
  <div className={preCls+'__space'} style={{transform:'rotate(45deg)'}}/>
@@ -18,6 +20,9 @@ function Board({percent}: Props): ReactElement {
18
20
  <div className={preCls+'__center'}>
19
21
  <div>{percent}%</div>
20
22
  </div>
23
+
24
+ </div>
25
+ <div className={preCls+'__cover--bottom'}/>
21
26
  </div>
22
27
  )
23
28
  }
@@ -132,17 +132,17 @@ function Card({data}: Props, ref): ReactElement {
132
132
  </div>
133
133
  <Board percent={Number(data.Complete)} />
134
134
  <div className={preCls + "__comparison"}>
135
- {
136
- data.Increase != '0' ? <>
135
+
137
136
  OKR 完成度
138
- <img
139
- className={preCls + "__direction"}
140
- src={Number( data.Increase) > 0 ? require("./img/up.png") : require('./img/down.png')}
141
- alt=""
142
- />
143
- <span style={{ color: Number( data.Increase) > 0 ? "#4DC591" : '#F05E5E'}}>{Math.abs(Number(data.Increase))}%</span>
144
- </> : ''
145
- }
137
+ {
138
+ data.Increase != '0' ? <> <img
139
+ className={preCls + "__direction"}
140
+ src={Number( data.Increase) > 0 ? require("./img/up.png") : require('./img/down.png')}
141
+ alt=""
142
+ />
143
+ <span style={{ color: Number( data.Increase) > 0 ? "#4DC591" : '#F05E5E'}}>{Math.abs(Number(data.Increase))}%</span></> : ''
144
+ }
145
+
146
146
  </div>
147
147
  <div className={preCls + "__colleague"}>
148
148
  {data.PromptLanguage}
@@ -7,11 +7,11 @@
7
7
  &-wrapper {
8
8
  overflow: hidden;
9
9
  width: 336px;
10
- height: 548px;
10
+ height: 534px;
11
11
  border-radius: 24px;
12
12
  .weekly-report-card-content {
13
13
  position: relative;
14
- top: -66px;
14
+ top: -52px;
15
15
  left: -20px;
16
16
  transform: scale(0.9);
17
17
  }
@@ -31,7 +31,7 @@
31
31
  align-items: center;
32
32
  width: 375px;
33
33
  height: 710px;
34
- background: linear-gradient(180deg, #B7D5FF 0%, #186FFF 100%);
34
+ background: linear-gradient(180deg, #B7D5FF 0%, #186FFF 50%);
35
35
  }
36
36
  &__title {
37
37
  width: 220px;
@@ -51,13 +51,14 @@
51
51
  flex-direction: column;
52
52
  align-items: center;
53
53
  width: 335px;
54
- height: 452px;
54
+ height: 422px;
55
55
  background: transparent;
56
56
  padding-top: 55px;
57
57
  border-radius: 12px;
58
58
  background-image: url('./img/body.png');
59
59
  background-size: 100% 100%;
60
60
  background-position-y: -1px;
61
+ box-sizing: content-box;
61
62
  }
62
63
  &__avatar {
63
64
  position: absolute;
@@ -117,16 +118,18 @@
117
118
  position: relative;
118
119
  &__done {
119
120
  position: absolute;
120
- width: 154px;
121
- height: 154px;
121
+ width: 150px;
122
+ height: 150px;
122
123
  border-radius: 50%;
123
- background: linear-gradient(360deg, #2879FF 0%, #5B8FF9 50%);
124
+ background: linear-gradient(90deg, #2879FF 0%, #5B8FF9 50%);
124
125
  overflow: hidden;
126
+ top: 2px;
127
+ left: 2px;
125
128
  }
126
129
  &__undone {
127
130
  position: absolute;
128
- left: -3px;
129
- bottom: 50%;
131
+ left: -5px;
132
+ bottom: 75px;
130
133
  width: 160px;
131
134
  height: 80px;
132
135
  background-color: rgb(234, 241, 254);
@@ -134,6 +137,24 @@
134
137
  transform: rotate(90deg);
135
138
  // background: radial-gradient(at bottom center,rgb(234, 241, 254) 0,rgb(234, 241, 254) 77px,transparent 77px);
136
139
  }
140
+ &__cover {
141
+ width: 154px;
142
+ height: 154px;
143
+ position: absolute;
144
+ border-radius: 50%;
145
+ box-sizing: border-box;
146
+ border: 2px solid #fff;
147
+ z-index: 10;
148
+ }
149
+ &__cover--bottom {
150
+ width: 154px;
151
+ height: 2px;
152
+ position: absolute;
153
+ bottom: 0;
154
+ box-sizing: border-box;
155
+ background-color: #FFF;
156
+ z-index: 10;
157
+ }
137
158
  &__space {
138
159
  position: absolute;
139
160
  width: 2px;
@@ -212,7 +233,7 @@
212
233
  display: flex;
213
234
  align-items: center;
214
235
  justify-content: space-between;
215
- margin-top: 29px;
236
+ margin-top: 18px;
216
237
 
217
238
  &__item {
218
239
  position: relative;
@@ -261,15 +282,15 @@
261
282
  }
262
283
  &__laba {
263
284
  position: absolute;
264
- left: 0;
265
- top: 118px;
285
+ left: 6px;
286
+ top: 108px;
266
287
  width: 94px;
267
288
  height: 65px;
268
289
  }
269
290
  &__bofang {
270
291
  position: absolute;
271
- right: 0;
272
- top: 130px;
292
+ right: 4px;
293
+ top: 124px;
273
294
  width: 62px;
274
295
  height: 66px;
275
296
  z-index: 1;
@@ -296,6 +317,8 @@
296
317
  background-color: transparent;
297
318
  font-size: 14px;
298
319
  color: #FFF;
320
+ backdrop-filter: blur(2px);
321
+ background-color: rgba($color: #FFF, $alpha: .1);
299
322
  &:hover{
300
323
  background-color: transparent;
301
324
  }
@@ -26,7 +26,7 @@ function WeeklyReportPreview({ onShare,onClose,data }) {
26
26
 
27
27
  return (
28
28
  <div style={{ position: "relative"}}>
29
- <div className={classnames("tu-icon-circle",preCls + "__close")} onClick={onClose}/>
29
+ <div className={classnames(preCls + "__close")} onClick={onClose}/>
30
30
  <div style={{ position: "absolute", left: "-99999999px" }}>
31
31
  <Card data={data} ref={cardRef} />
32
32
  </div>
@@ -73,7 +73,7 @@ function WeeklyReportModal({}: Props) {
73
73
  setVisible(true)
74
74
  })
75
75
  return () => window?.Talent?.app.vent.off('open-weekly-report-modal')
76
- }, [])
76
+ }, [visible])
77
77
 
78
78
  useEffect(()=>{
79
79
  if(!visible) return