@titaui/pc 1.11.2 → 1.11.3-2.beta-1
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/avatar/text-avatar/index.css +7 -0
- package/lib/components/avatar/text-avatar/index.js +32 -7
- package/lib/components/button/icon-btn/index.js +17 -8
- package/lib/components/button/rect-btn/index.js +7 -7
- package/lib/components/change-okr-modal/Item.js +15 -15
- package/lib/components/communication/index.js +30 -29
- package/lib/components/drawer/index.js +7 -6
- package/lib/components/drop-selector/index.js +25 -10
- package/lib/components/dynamic/constant.js +43 -36
- package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/dynamic-footer.js +243 -0
- package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/index.js +6 -2
- package/lib/components/dynamic/dynamic-item/dynamic-interview/img/wifi.svg +24 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview/index.css +51 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview/index.js +50 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview/interview-content.js +65 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview-share/img/wifi.svg +24 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview-share/index.css +61 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview-share/index.js +61 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview-share/interview-content.js +69 -0
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +6 -6
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +7 -7
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +11 -11
- package/lib/components/dynamic/dynamic-item/dynamic-reply/index.js +14 -14
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +10 -10
- package/lib/components/dynamic/dynamic-item/index.js +70 -41
- package/lib/components/dynamic/dynamic-list/index.js +5 -13
- package/lib/components/e-priority/index.js +18 -12
- package/lib/components/eReport/eReportShare/index.js +12 -12
- package/lib/components/file-list/components/single-file/index.js +11 -11
- package/lib/components/form/form-fields/date/index.css +24 -0
- package/lib/components/form/form-fields/date/index.js +102 -0
- package/lib/components/form/form-fields/input/index.js +10 -10
- package/lib/components/form/form-fields/user/index.css +23 -3
- package/lib/components/form/form-fields/user/index.js +18 -8
- package/lib/components/form/form-fields/user/user-input.js +15 -6
- package/lib/components/form/index.js +10 -3
- package/lib/components/grid-layout/sub-employee-okr/person-okr.js +11 -5
- package/lib/components/icon-button-list/index.css +2 -57
- package/lib/components/icon-button-list/index.js +10 -7
- package/lib/components/img-viewer/index.css +10 -3
- package/lib/components/img-viewer/index.js +57 -18
- package/lib/components/mblog/components/MblogContent.js +5 -2
- package/lib/components/mblog/index.js +31 -30
- package/lib/components/menus/components/menu-tree/images/interview-menu/my-interview.svg +16 -0
- package/lib/components/menus/components/menu-tree/images/interview-menu/template.svg +16 -0
- package/lib/components/menus/components/menu-tree/images/interview-menu/todo.svg +16 -0
- package/lib/components/menus/components/menu-tree/index.css +4 -2
- package/lib/components/menus/components/menu-tree/tree-node/index.css +85 -1
- package/lib/components/menus/export-modules/interview-menus/constant.js +30 -0
- package/lib/components/menus/export-modules/interview-menus/handle-highlight.js +63 -0
- package/lib/components/menus/export-modules/interview-menus/index.css +7 -0
- package/lib/components/menus/export-modules/interview-menus/index.js +128 -0
- package/lib/components/menus/index.js +11 -5
- package/lib/components/nav-top/components/menu/index.js +14 -14
- package/lib/components/nav-top/components/user-message/components/inform/inform-item.js +25 -19
- package/lib/components/nav-top/components/user-message/components/remind/remind-item.js +48 -10
- package/lib/components/nav-top/components/user-message/constant.js +1 -0
- package/lib/components/nav-top/components/user-message/hrMessage.js +22 -19
- package/lib/components/nav-top/components/user-message/index.js +23 -20
- package/lib/components/nav-top/request.apis.js +3 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-priority-dropdown.js +7 -7
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +3 -2
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/range-picker-pop.js +10 -0
- package/lib/components/okr-detail/detail-header/actions.js +62 -66
- package/lib/components/okr-detail/detail-header/index.css +2 -2
- package/lib/components/okr-detail/detail-header/index.js +205 -194
- package/lib/components/okr-detail/index.js +21 -19
- package/lib/components/okr-detail/okr-list/index.js +5 -3
- package/lib/components/okr-flow/child-node/index.css +67 -21
- package/lib/components/okr-flow/child-node/work-node.js +61 -24
- package/lib/components/okr-flow/empty/index.css +8 -1
- package/lib/components/okr-flow/export-modal/index.js +63 -21
- package/lib/components/okr-flow/export-modules/okr-search-panel/index.css +3 -1
- package/lib/components/okr-flow/export-modules/okr-search-panel/index.js +30 -24
- package/lib/components/okr-flow/images/loading-light.gif +0 -0
- package/lib/components/okr-flow/okr-map/index.js +43 -22
- package/lib/components/okr-flow/request-apis.js +15 -8
- package/lib/components/okr-flow/root-node/index.css +2 -2
- package/lib/components/okr-flow/root-node/index.js +26 -25
- package/lib/components/okr-flow/utils/index.js +45 -29
- package/lib/components/okr-flow/utils/tree-handler.js +29 -18
- package/lib/components/okr-progress-modal/index.css +1 -1
- package/lib/components/okrcase-library/index.css +6 -4
- package/lib/components/okrcase-library/okrcases-components/submitOkr-dialog.js +36 -30
- package/lib/components/pagination/index.css +3 -3
- package/lib/components/pagination/select.css +58 -23
- package/lib/components/period-selector/index.css +9 -3
- package/lib/components/period-selector/index.js +14 -11
- package/lib/components/picker/components/panels/date-panel/date-body.js +118 -0
- package/lib/components/picker/components/panels/date-panel/date-head.js +87 -0
- package/lib/components/picker/components/panels/date-panel/index.css +14 -0
- package/lib/components/picker/components/panels/date-panel/index.js +49 -0
- package/lib/components/picker/components/panels/month-panel/index.css +27 -0
- package/lib/components/picker/components/panels/month-panel/index.js +63 -0
- package/lib/components/picker/components/panels/month-panel/month-body.js +89 -0
- package/lib/components/picker/components/panels/month-panel/month-head.js +47 -0
- package/lib/components/picker/components/panels/panel-body/index.js +53 -0
- package/lib/components/picker/components/panels/panel-head/index.js +48 -0
- package/lib/components/picker/components/panels/year-panel/index.css +23 -0
- package/lib/components/picker/components/panels/year-panel/index.js +65 -0
- package/lib/components/picker/components/panels/year-panel/year-body.js +92 -0
- package/lib/components/picker/components/panels/year-panel/year-head.js +35 -0
- package/lib/components/picker/components/picker-trigger/index.css +57 -0
- package/lib/components/picker/components/picker-trigger/index.js +94 -0
- package/lib/components/picker/context.js +15 -0
- package/lib/components/picker/index.css +121 -0
- package/lib/components/picker/index.js +13 -0
- package/lib/components/picker/picker-panels.js +182 -0
- package/lib/components/picker/picker.js +132 -0
- package/lib/components/picker/type.js +5 -0
- package/lib/components/picker/utils.js +28 -0
- package/lib/components/popup/index.js +4 -4
- package/lib/components/radio/index.css +9 -9
- package/lib/components/scroll-container/index.js +423 -0
- package/lib/components/scroll-container/style.css +35 -0
- package/lib/components/scrollbar/scroll-mask/index.js +1 -1
- package/lib/components/superset-charts/components/chart/index.js +1 -1
- package/lib/components/superset-charts/utils/axios.js +5 -13
- package/lib/components/survey-model/contact.js +93 -0
- package/lib/components/survey-model/index.css +141 -0
- package/lib/components/survey-model/index.js +268 -0
- package/lib/components/survey-model/instance.js +86 -0
- package/lib/components/survey-model/request-api.js +80 -0
- package/lib/components/task-tree/helper.js +61 -0
- package/lib/components/task-tree/images/P1.svg +15 -0
- package/lib/components/task-tree/images/P2.svg +15 -0
- package/lib/components/task-tree/images/P3.svg +15 -0
- package/lib/components/task-tree/images/P4.svg +15 -0
- package/lib/components/task-tree/images/P5.svg +15 -0
- package/lib/components/task-tree/images/arrow.svg +9 -0
- package/lib/components/task-tree/images/empty-131.png +0 -0
- package/lib/components/task-tree/images/followed.svg +33 -0
- package/lib/components/task-tree/images/nice.svg +108 -0
- package/lib/components/task-tree/images/struc12.png +0 -0
- package/lib/components/task-tree/images/struc2.png +0 -0
- package/lib/components/task-tree/images/xialat-s.svg +13 -0
- package/lib/components/task-tree/index.js +22 -0
- package/lib/components/task-tree/mock.js +944 -0
- package/lib/components/task-tree/precls.js +8 -0
- package/lib/components/task-tree/request-apis.js +88 -0
- package/lib/components/task-tree/task-item-node/constant.js +45 -0
- package/lib/components/task-tree/task-item-node/e-empty.js +29 -0
- package/lib/components/task-tree/task-item-node/e-project.js +212 -0
- package/lib/components/task-tree/task-item-node/e-status-dropdown.js +94 -0
- package/lib/components/task-tree/task-item-node/e-task.js +426 -0
- package/lib/components/task-tree/task-item-node/get-process-color.js +62 -0
- package/lib/components/task-tree/task-item-node/index.css +289 -0
- package/lib/components/task-tree/task-item-node/task-node-render.js +43 -0
- package/lib/components/task-tree/task-tree.css +16 -0
- package/lib/components/task-tree/task-tree.js +49 -0
- package/lib/components/time-picker/index.css +123 -0
- package/lib/components/time-picker/index.js +13 -0
- package/lib/components/time-picker/time-picker-selector.js +138 -0
- package/lib/components/time-picker/time-picker.js +336 -0
- package/lib/components/time-picker/timer-picker-input.js +96 -0
- package/lib/components/time-picker/utils.js +52 -0
- package/lib/components/user-selector/select-tree/tree-nodes/tree-person-node/index.css +1 -0
- package/lib/components/wechat-btn/index.css +14 -0
- package/lib/components/wechat-btn/index.js +338 -0
- package/lib/components-v1/radio/radio.js +3 -3
- package/lib/components-v1/radio/style/index.css +8 -8
- package/lib/index.js +101 -77
- package/lib/pages/aha2021/index.js +5 -1
- package/lib/pages/okr-map/export-modules/okr-map/header/index.css +7 -2
- package/lib/pages/okr-map/export-modules/okr-map/header/index.js +73 -34
- package/lib/pages/okr-map/export-modules/okr-map/okr-map.js +65 -42
- package/lib/pages/okr-map/export-modules/share-okr-page/header/index.css +26 -14
- package/lib/pages/okr-map/export-modules/share-okr-page/header/index.js +58 -13
- package/lib/pages/okr-map/export-modules/share-okr-page/share-okr-map.js +28 -20
- package/lib/pages/okr-map/number-select/index.css +12 -9
- package/lib/pages/okr-map/number-select/index.js +3 -3
- package/lib/utils/auth.js +65 -8
- package/lib/utils/bs-global.js +18 -6
- package/lib/utils/hooks.js +72 -0
- package/lib/utils/open-data.js +63 -43
- package/package.json +6 -2
- package/.eslintignore +0 -3
- package/.eslintrc.js +0 -223
- package/.husky/pre-commit +0 -4
- package/.prettierignore +0 -31
- package/.prettierrc.js +0 -90
- package/.vscode/settings.json +0 -5
|
@@ -0,0 +1,338 @@
|
|
|
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 _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
14
|
+
var _tooltip = _interopRequireDefault(require("../tooltip"));
|
|
15
|
+
|
|
16
|
+
var _dialogConfirm = _interopRequireWildcard(require("../dialog-confirm"));
|
|
17
|
+
|
|
18
|
+
var _getLocale = require("../../utils/getLocale");
|
|
19
|
+
|
|
20
|
+
var _request = require("../../utils/request");
|
|
21
|
+
|
|
22
|
+
var _bsGlobal = require("../../utils/bs-global");
|
|
23
|
+
|
|
24
|
+
require("./index.css");
|
|
25
|
+
|
|
26
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
27
|
+
|
|
28
|
+
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); }
|
|
29
|
+
|
|
30
|
+
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; }
|
|
31
|
+
|
|
32
|
+
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; }
|
|
33
|
+
|
|
34
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
35
|
+
|
|
36
|
+
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."); }
|
|
37
|
+
|
|
38
|
+
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); }
|
|
39
|
+
|
|
40
|
+
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; }
|
|
41
|
+
|
|
42
|
+
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; }
|
|
43
|
+
|
|
44
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
45
|
+
|
|
46
|
+
var preCls = 'titaui-wechat-btn';
|
|
47
|
+
var userId = (0, _bsGlobal.getUserInfo)().Id;
|
|
48
|
+
var isDingDing = (0, _bsGlobal.getSource)() === 861;
|
|
49
|
+
|
|
50
|
+
var WeChatBtn = function WeChatBtn(props) {
|
|
51
|
+
var id = props.id,
|
|
52
|
+
objType = props.objType,
|
|
53
|
+
name = props.name,
|
|
54
|
+
principalUser = props.principalUser;
|
|
55
|
+
|
|
56
|
+
var _useState = (0, _react.useState)(false),
|
|
57
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
58
|
+
isShowWeChat = _useState2[0],
|
|
59
|
+
setIsShowWeChat = _useState2[1];
|
|
60
|
+
|
|
61
|
+
var _useState3 = (0, _react.useState)([]),
|
|
62
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
63
|
+
weChatGroupMember = _useState4[0],
|
|
64
|
+
setWeChatGroupMember = _useState4[1];
|
|
65
|
+
|
|
66
|
+
var _useState5 = (0, _react.useState)('chatId'),
|
|
67
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
68
|
+
chatId = _useState6[0],
|
|
69
|
+
setChatId = _useState6[1];
|
|
70
|
+
|
|
71
|
+
var _useState7 = (0, _react.useState)(),
|
|
72
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
73
|
+
loginUserOpenId = _useState8[0],
|
|
74
|
+
setLoginUserOpenId = _useState8[1];
|
|
75
|
+
|
|
76
|
+
var _useState9 = (0, _react.useState)(''),
|
|
77
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
78
|
+
url = _useState10[0],
|
|
79
|
+
setUrl = _useState10[1];
|
|
80
|
+
|
|
81
|
+
var _useState11 = (0, _react.useState)(false),
|
|
82
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
83
|
+
createWechatVisible = _useState12[0],
|
|
84
|
+
setCreateWechatVisible = _useState12[1];
|
|
85
|
+
|
|
86
|
+
var _useState13 = (0, _react.useState)(''),
|
|
87
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
88
|
+
tooltip = _useState14[0],
|
|
89
|
+
setTooltip = _useState14[1];
|
|
90
|
+
|
|
91
|
+
var _useState15 = (0, _react.useState)('目标'),
|
|
92
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
93
|
+
apply = _useState16[0],
|
|
94
|
+
setApply = _useState16[1];
|
|
95
|
+
|
|
96
|
+
var _useState17 = (0, _react.useState)(false),
|
|
97
|
+
_useState18 = _slicedToArray(_useState17, 2),
|
|
98
|
+
isHasGroup = _useState18[0],
|
|
99
|
+
setIsHasGroup = _useState18[1];
|
|
100
|
+
|
|
101
|
+
var _useState19 = (0, _react.useState)(false),
|
|
102
|
+
_useState20 = _slicedToArray(_useState19, 2),
|
|
103
|
+
macWarnModalVisible = _useState20[0],
|
|
104
|
+
setMacWarnModalVisible = _useState20[1];
|
|
105
|
+
|
|
106
|
+
var _useState21 = (0, _react.useState)(false),
|
|
107
|
+
_useState22 = _slicedToArray(_useState21, 2),
|
|
108
|
+
principalUserModalVisible = _useState22[0],
|
|
109
|
+
setPrincipalUserModalVisible = _useState22[1];
|
|
110
|
+
|
|
111
|
+
var _useState23 = (0, _react.useState)(false),
|
|
112
|
+
_useState24 = _slicedToArray(_useState23, 2),
|
|
113
|
+
memberVisible = _useState24[0],
|
|
114
|
+
setMemberVisible = _useState24[1];
|
|
115
|
+
|
|
116
|
+
var isWx = navigator.userAgent.match(/wxwork/);
|
|
117
|
+
var isMac = navigator.userAgent.match(/Mac/);
|
|
118
|
+
/**
|
|
119
|
+
* 点击企业微信图标这块稍许复杂 注释说明一下
|
|
120
|
+
* 先判断有没有群 没群就新建群
|
|
121
|
+
* 有群就先调用加人的接口 人本身不在群的情况 成功加人就打开进入群聊
|
|
122
|
+
* 人在群的情况 加人接口返回报错信息updateEnterpriseChat:fail_unsupported chat 则调用打开群接口
|
|
123
|
+
* 群解散的情况 则弹窗提示 联系负责人手动加群
|
|
124
|
+
* mac 不支持加人接口
|
|
125
|
+
*/
|
|
126
|
+
|
|
127
|
+
var handleClickWechatBtn = function handleClickWechatBtn() {
|
|
128
|
+
if (isWx) {
|
|
129
|
+
//有群了,判断没在群就先进群再打开群
|
|
130
|
+
if (chatId !== null && chatId !== 'chatId') {
|
|
131
|
+
wx.invoke('openExistedChatWithMsg', {
|
|
132
|
+
chatId: chatId
|
|
133
|
+
}, function (res) {
|
|
134
|
+
if (res.err_msg === 'openExistedChatWithMsg:ok') {
|
|
135
|
+
console.log('打开群成功');
|
|
136
|
+
} else {
|
|
137
|
+
if (isMac) {
|
|
138
|
+
setMacWarnModalVisible(true);
|
|
139
|
+
} else {
|
|
140
|
+
wx.invoke('updateEnterpriseChat', {
|
|
141
|
+
chatId: chatId,
|
|
142
|
+
userIdsToAdd: loginUserOpenId
|
|
143
|
+
}, function (res) {
|
|
144
|
+
console.log(chatId);
|
|
145
|
+
|
|
146
|
+
if (res.err_msg == 'updateEnterpriseChat:ok') {
|
|
147
|
+
wx.invoke('openExistedChatWithMsg', {
|
|
148
|
+
chatId: chatId
|
|
149
|
+
}, function (res) {
|
|
150
|
+
if (res.err_msg == 'openExistedChatWithMsg:ok') {
|
|
151
|
+
console.log('打开群成功');
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
} else {
|
|
155
|
+
if (userId === principalUser.userId) {
|
|
156
|
+
setPrincipalUserModalVisible(true);
|
|
157
|
+
} else {
|
|
158
|
+
setMemberVisible(true);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
} else {
|
|
166
|
+
setCreateWechatVisible(true);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
var closeCreateWeChatModal = function closeCreateWeChatModal() {
|
|
172
|
+
setCreateWechatVisible(false);
|
|
173
|
+
}; //创建群聊or打开群聊
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
var handleCreateGroupChat = function handleCreateGroupChat() {
|
|
177
|
+
wx.invoke('createChatWithMsg', {
|
|
178
|
+
selectedOpenUserIds: weChatGroupMember,
|
|
179
|
+
chatName: "\u300C".concat(apply, "\u7FA4\u300D").concat(name),
|
|
180
|
+
msg: {
|
|
181
|
+
msgtype: 'link',
|
|
182
|
+
link: {
|
|
183
|
+
title: name,
|
|
184
|
+
desc: '',
|
|
185
|
+
url: url,
|
|
186
|
+
imgUrl: 'https://club.tita.com/wp-content/uploads/2022/03/1648725106-20220331191146996.png'
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}, function (res) {
|
|
190
|
+
if (res.err_msg === 'createChatWithMsg:ok') {
|
|
191
|
+
if (res.chatId) {
|
|
192
|
+
(0, _request.rpost)('v1')('chat/add', {
|
|
193
|
+
objId: id,
|
|
194
|
+
objType: objType,
|
|
195
|
+
chatId: res.chatId
|
|
196
|
+
});
|
|
197
|
+
wx.invoke('openExistedChatWithMsg', {
|
|
198
|
+
chatId: res.chatId
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
setCreateWechatVisible(false);
|
|
204
|
+
setPrincipalUserModalVisible(false);
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
var handleKnowMacWarn = function handleKnowMacWarn() {
|
|
208
|
+
setMacWarnModalVisible(false);
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
var closeprincipalUserModal = function closeprincipalUserModal() {
|
|
212
|
+
setPrincipalUserModalVisible(false);
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
var handleMemberVisible = function handleMemberVisible() {
|
|
216
|
+
setMemberVisible(false);
|
|
217
|
+
}; //chatId 为null表示未创建群聊 chatId为默认值chatId表示不是企业微信工作台,可能是其他浏览器等 chatId有值,表示创建了群聊
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
(0, _react.useEffect)(function () {
|
|
221
|
+
if (isDingDing) {
|
|
222
|
+
return;
|
|
223
|
+
} else {
|
|
224
|
+
(0, _request.rpost)('v1')('chat/info', {
|
|
225
|
+
objId: id,
|
|
226
|
+
objType: objType
|
|
227
|
+
}).then(function (res) {
|
|
228
|
+
if (res.Message === '没有权限') {
|
|
229
|
+
setIsShowWeChat(false);
|
|
230
|
+
return;
|
|
231
|
+
} else {
|
|
232
|
+
setIsShowWeChat(true);
|
|
233
|
+
|
|
234
|
+
if (res.Data.obj) {
|
|
235
|
+
setIsHasGroup(true);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
if (isWx) {
|
|
239
|
+
console.log(res.Data.obj);
|
|
240
|
+
setChatId(res.Data.obj);
|
|
241
|
+
(0, _request.rpost)('v1')('chat/users', {
|
|
242
|
+
objId: id,
|
|
243
|
+
objType: objType
|
|
244
|
+
}).then(function (res) {
|
|
245
|
+
setWeChatGroupMember(res.Data.openUserIds);
|
|
246
|
+
setUrl(res.Data.link);
|
|
247
|
+
});
|
|
248
|
+
(0, _request.rpost)('v1')('chat/user', {
|
|
249
|
+
objId: id,
|
|
250
|
+
objType: objType
|
|
251
|
+
}).then(function (res) {
|
|
252
|
+
setLoginUserOpenId(res.Data.obj);
|
|
253
|
+
});
|
|
254
|
+
} else {
|
|
255
|
+
setIsShowWeChat(true);
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
}, [chatId]);
|
|
262
|
+
(0, _react.useEffect)(function () {
|
|
263
|
+
if (isShowWeChat && chatId === null) {
|
|
264
|
+
setTooltip((0, _getLocale.getLocale)('OKR_Db_ClickWeComg'));
|
|
265
|
+
} else if (isShowWeChat && chatId !== null && chatId !== 'chatId') {
|
|
266
|
+
setTooltip('进入群聊');
|
|
267
|
+
} else if (isShowWeChat && chatId === 'chatId') {
|
|
268
|
+
setTooltip('浏览器不支持此功能,请到企业微信工作台中使用');
|
|
269
|
+
}
|
|
270
|
+
}, [chatId, isShowWeChat]);
|
|
271
|
+
(0, _react.useEffect)(function () {
|
|
272
|
+
if (objType === 62) {
|
|
273
|
+
setApply('目标');
|
|
274
|
+
} else {
|
|
275
|
+
setApply('任务');
|
|
276
|
+
}
|
|
277
|
+
}, []);
|
|
278
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
279
|
+
overlay: tooltip,
|
|
280
|
+
placement: "bottom"
|
|
281
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
282
|
+
className: (0, _classnames["default"])(preCls, _defineProperty({}, "".concat(preCls, "__chat"), isHasGroup), _defineProperty({}, 'tu-icon-qw-chat', isShowWeChat)),
|
|
283
|
+
onMouseDown: handleClickWechatBtn
|
|
284
|
+
})), /*#__PURE__*/_react["default"].createElement(_dialogConfirm["default"], {
|
|
285
|
+
zIndex: 1200,
|
|
286
|
+
visible: createWechatVisible,
|
|
287
|
+
type: "warning"
|
|
288
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
289
|
+
type: "title"
|
|
290
|
+
}, "\u786E\u5B9A\u53D1\u8D77\u7FA4\u804A\u5417"), /*#__PURE__*/_react["default"].createElement("span", {
|
|
291
|
+
type: "content"
|
|
292
|
+
}, "\u53EF\u9009\u62E9".concat(apply, "\u76F8\u5173\u4EBA\u5458\u5FEB\u901F\u5EFA\u7FA4\u6C9F\u901A\u3002\u6CE8\u610F\uFF0C\u81F3\u5C11\u9009\u62E9 3 \u4EBA\uFF0C\u624D\u80FD\u6B63\u5E38\u53D1\u8D77\u7FA4\u804A\u3002")), /*#__PURE__*/_react["default"].createElement(_dialogConfirm.CancelButton, {
|
|
293
|
+
type: "button",
|
|
294
|
+
onClick: closeCreateWeChatModal
|
|
295
|
+
}, "\u53D6\u6D88"), /*#__PURE__*/_react["default"].createElement(_dialogConfirm.SureButton, {
|
|
296
|
+
type: "button",
|
|
297
|
+
onClick: handleCreateGroupChat
|
|
298
|
+
}, "\u53D1\u8D77\u7FA4\u804A")), /*#__PURE__*/_react["default"].createElement(_dialogConfirm["default"], {
|
|
299
|
+
zIndex: 1200,
|
|
300
|
+
visible: macWarnModalVisible,
|
|
301
|
+
type: "warning"
|
|
302
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
303
|
+
type: "title"
|
|
304
|
+
}, "\u8BF7\u6CE8\u610F"), /*#__PURE__*/_react["default"].createElement("span", {
|
|
305
|
+
type: "content"
|
|
306
|
+
}, "\u8BE5\u4F01\u4E1A\u5FAE\u4FE1\u7248\u672C\u4E0D\u652F\u6301\u81EA\u52A8\u52A0\u5165\uFF0C\u8BF7\u8054\u7CFB".concat(apply, "\u8D1F\u8D23\u4EBA\u624B\u52A8\u52A0\u4F60\u5165\u7FA4")), /*#__PURE__*/_react["default"].createElement(_dialogConfirm.SureButton, {
|
|
307
|
+
type: "button",
|
|
308
|
+
onClick: handleKnowMacWarn
|
|
309
|
+
}, "\u6211\u77E5\u9053\u4E86")), /*#__PURE__*/_react["default"].createElement(_dialogConfirm["default"], {
|
|
310
|
+
zIndex: 1200,
|
|
311
|
+
visible: principalUserModalVisible,
|
|
312
|
+
type: "warning"
|
|
313
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
314
|
+
type: "title"
|
|
315
|
+
}, "\u8BF7\u6CE8\u610F"), /*#__PURE__*/_react["default"].createElement("span", {
|
|
316
|
+
type: "content"
|
|
317
|
+
}, "\u4F60\u4E0D\u5728\u7FA4\u91CC\u6216\u8BE5\u7FA4\u5DF2\u89E3\u6563\u3002\u53EF\u4EE5\u8054\u7CFB".concat(apply, "\u6210\u5458\u62C9\u4F60\u5165\u7FA4\u3002\u4F60\u4E5F\u53EF\u4EE5\u91CD\u65B0\u5EFA\u7FA4\u3002")), /*#__PURE__*/_react["default"].createElement(_dialogConfirm.CancelButton, {
|
|
318
|
+
type: "button",
|
|
319
|
+
onClick: closeprincipalUserModal
|
|
320
|
+
}, "\u53D6\u6D88"), /*#__PURE__*/_react["default"].createElement(_dialogConfirm.SureButton, {
|
|
321
|
+
type: "button",
|
|
322
|
+
onClick: handleCreateGroupChat
|
|
323
|
+
}, "\u53D1\u8D77\u7FA4\u804A")), /*#__PURE__*/_react["default"].createElement(_dialogConfirm["default"], {
|
|
324
|
+
zIndex: 1200,
|
|
325
|
+
visible: memberVisible,
|
|
326
|
+
type: "warning"
|
|
327
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
328
|
+
type: "title"
|
|
329
|
+
}, "\u8BF7\u6CE8\u610F"), /*#__PURE__*/_react["default"].createElement("span", {
|
|
330
|
+
type: "content"
|
|
331
|
+
}, "\u4F60\u4E0D\u5728\u7FA4\u91CC\u6216\u8BE5\u7FA4\u5DF2\u89E3\u6563\u3002\u53EF\u4EE5\u8054\u7CFB".concat(apply, "\u6210\u5458\u62C9\u4F60\u5165\u7FA4\u3002")), /*#__PURE__*/_react["default"].createElement(_dialogConfirm.SureButton, {
|
|
332
|
+
type: "button",
|
|
333
|
+
onClick: handleMemberVisible
|
|
334
|
+
}, "\u6211\u77E5\u9053\u4E86")));
|
|
335
|
+
};
|
|
336
|
+
|
|
337
|
+
var _default = WeChatBtn;
|
|
338
|
+
exports["default"] = _default;
|
|
@@ -9,10 +9,10 @@ exports["default"] = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
-
require("./style/index.css");
|
|
13
|
-
|
|
14
12
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
15
13
|
|
|
14
|
+
require("./style/index.css");
|
|
15
|
+
|
|
16
16
|
var _templateObject;
|
|
17
17
|
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -43,7 +43,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
43
43
|
|
|
44
44
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
45
45
|
|
|
46
|
-
var RadioWrapper = _styledComponents["default"].label(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n cursor: pointer;\n color: #36434d;\n margin-right: 15px;\n box-sizing: border-box;\n .label {\n position: relative;\n user-select: none;\n top: -2px;\n }\n"])));
|
|
46
|
+
var RadioWrapper = _styledComponents["default"].label(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n cursor: pointer;\n color: #36434d;\n margin-right: 15px;\n box-sizing: border-box;\n display: flex;\n\n .label {\n position: relative;\n user-select: none;\n top: -2px;\n }\n"])));
|
|
47
47
|
|
|
48
48
|
var Radio = /*#__PURE__*/function (_Component) {
|
|
49
49
|
_inherits(Radio, _Component);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
.tita-radio {
|
|
2
2
|
display: inline-block;
|
|
3
3
|
position: relative;
|
|
4
|
-
top:
|
|
4
|
+
top: 1px;
|
|
5
5
|
width: 16px;
|
|
6
6
|
min-width: 16px;
|
|
7
7
|
height: 16px;
|
|
@@ -30,19 +30,19 @@
|
|
|
30
30
|
bottom: 0;
|
|
31
31
|
border-radius: 100px;
|
|
32
32
|
background-color: #fff;
|
|
33
|
-
border: 1px solid #
|
|
33
|
+
border: 1px solid #dfe3ea;
|
|
34
34
|
transition: all 300ms;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
.tita-radio .tita-radio-inner::after {
|
|
38
38
|
content: '';
|
|
39
39
|
position: absolute;
|
|
40
|
-
top:
|
|
41
|
-
left:
|
|
42
|
-
width:
|
|
43
|
-
min-width:
|
|
44
|
-
height:
|
|
45
|
-
min-height:
|
|
40
|
+
top: 2px;
|
|
41
|
+
left: 2px;
|
|
42
|
+
width: 10px;
|
|
43
|
+
min-width: 10px;
|
|
44
|
+
height: 10px;
|
|
45
|
+
min-height: 10px;
|
|
46
46
|
border-radius: 50%;
|
|
47
47
|
background-color: #2879ff !important;
|
|
48
48
|
transform: scale(0);
|