@titaui/pc 1.16.81 → 1.16.83-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.
@@ -100,73 +100,43 @@ var DingdingBtn = function DingdingBtn(props) {
100
100
  (0, _react.useEffect)(function () {
101
101
  console.log(id, objType, name, principalUser);
102
102
  }, []);
103
-
104
- /**
105
- * 点击企业微信图标这块稍许复杂 注释说明一下
106
- * 先判断有没有群 没群就新建群
107
- * 有群就先调用加人的接口 人本身不在群的情况 成功加人就打开进入群聊
108
- * 人在群的情况 加人接口返回报错信息updateEnterpriseChat:fail_unsupported chat 则调用打开群接口
109
- * 群解散的情况 则弹窗提示 联系负责人手动加群
110
- * mac 不支持加人接口
111
- */
112
-
113
103
  var handleClickWechatBtn = function handleClickWechatBtn() {
114
104
  if (isDingDing) {
115
105
  //有群了,判断没在群就先进群再打开群
116
106
  if (chatId !== null && chatId !== 'chatId') {
117
- // dd.biz.chat.toConversation({
118
- // //根据chatId跳转到对应会话
119
- // corpId: corpId, //企业id
120
- // chatId: chatId, //会话id
121
- // onSuccess: function (res) {
122
- // console.log('打开群成功', res)
123
- // },
124
- // onFail: function (err) {
125
- // // 调用失败时回调
126
- // console.log(err)
127
- // if (isMac) {
128
- // setMacWarnModalVisible(true)
129
- // } else {
130
- // addMembers({
131
- // context: {
132
- // coolAppCode: coolAppCode, //酷应用的编码
133
- // clientId: suiteKey, // 应用标识
134
- // corpId: corpId, // 根据对应场景获取 corpId
135
- // },
136
- // openConversationList: [chatId], //要添加成员的的群ID
137
- // userIds: [loginUserOpenId+''], //需要入群的成员userId。
138
- // })
139
- // .then((res) => {
140
- // console.log(res,'addMembers');
107
+ console.table({
108
+ 'coolAppCode': coolAppCode,
109
+ 'clientId': suiteKey,
110
+ 'corpId': corpId,
111
+ 'openConversationList': [chatId],
112
+ 'userIds': dingChatGroupMember
113
+ });
114
+ (0, _coolAppSdk.addMembers)({
115
+ context: {
116
+ coolAppCode: coolAppCode,
117
+ //酷应用的编码
118
+ clientId: suiteKey,
119
+ // 应用标识
120
+ corpId: corpId // 根据对应场景获取 corpId
121
+ },
141
122
 
142
- // if (res.errorCode === '0') {
143
- // console.log('添加成功' + JSON.stringify(res))
144
- // dd.biz.chat.toConversation({
145
- // corpId: corpId,
146
- // chatId: chatId,
147
- // onSuccess: function (res) {
148
- // // 调用成功时回调
149
- // console.log('打开群成功', res)
150
- // },
151
- // onFail: function (err) {
152
- // // 调用失败时回调
153
- // console.log(err)
154
- // },
155
- // })
156
- // } else {
157
- // if (userId === principalUser.userId) {
158
- // setPrincipalUserModalVisible(true)
159
- // } else {
160
- // setMemberVisible(true)
161
- // }
162
- // }
163
- // })
164
- // .catch((e) => {
165
- // console.log('添加失败' + JSON.stringify(e))
166
- // })
167
- // }
168
- // },
169
- // })
123
+ openConversationList: [chatId],
124
+ //要添加成员的的群ID
125
+ userIds: dingChatGroupMember //需要入群的成员userId。
126
+ }).then(function (res) {
127
+ console.log(res, 'addMembers');
128
+ if (res.errorCode === '0') {
129
+ console.log("添加成功res" + JSON.stringify(res));
130
+ } else {
131
+ // if (userId === principalUser.userId) {
132
+ // setPrincipalUserModalVisible(true)
133
+ // } else {
134
+ // setMemberVisible(true)
135
+ // }
136
+ }
137
+ })["catch"](function (e) {
138
+ console.log('添加失败' + JSON.stringify(e));
139
+ });
170
140
  } else {
171
141
  setCreateDingchatVisible(true);
172
142
  }
@@ -186,16 +156,13 @@ var DingdingBtn = function DingdingBtn(props) {
186
156
  },
187
157
 
188
158
  title: "\u300C".concat(apply, "\u7FA4\u300D").concat(name),
189
- memberUserIds: dingChatGroupMember,
190
- managementOptions: {
191
- validationType: 1,
192
- mentionAllAuthority: 1
193
- }
159
+ memberUserIds: dingChatGroupMember
194
160
  }).then(function (res) {
195
161
  console.log(res, 'createGroup');
196
162
  if (res.errorCode === '0') {
197
163
  // 建群成功
198
164
  if (res.detail.openConversationId) {
165
+ console.log(res.detail.openConversationId, 'res.detail.openConversationId');
199
166
  // 创建的群id
200
167
  (0, _request.rpost)('v1')('chat/add', {
201
168
  objId: id,
@@ -207,8 +174,7 @@ var DingdingBtn = function DingdingBtn(props) {
207
174
  }
208
175
  }
209
176
  })["catch"](function (e) {
210
- console.log(e);
211
-
177
+ console.log(e, 'catch');
212
178
  // 用户主动退出安装
213
179
  });
214
180
 
@@ -283,7 +249,8 @@ var DingdingBtn = function DingdingBtn(props) {
283
249
  if (isShowDingChat && chatId === null) {
284
250
  setTooltip('点击一键发起钉钉群聊');
285
251
  } else if (isShowDingChat && chatId !== null && chatId !== 'chatId') {
286
- setTooltip("\u9489\u9489\u7FA4\u804A\u540D\u79F0:\u300C".concat(apply, "\u7FA4\u300D").concat(name));
252
+ setTooltip("\u6DFB\u52A0\u7FA4\u6210\u5458");
253
+ // setTooltip(`钉钉群聊名称:「${apply}群」${name}`)
287
254
  } else if (isShowDingChat && chatId === 'chatId') {
288
255
  setTooltip('浏览器不支持此功能,请到钉钉工作台中使用');
289
256
  }
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.USER_NODE = exports.USER_CONCERN_NODE = exports.TONGJI_NODE = exports.SUMMARY_USER_CONCERN_NODE = exports.SUMMARY_FOLLOWER_NODE = exports.SUB_MENU_ITEM_NOE = exports.SUBORDINATES_NODE = exports.SHARE_NODE = exports.SAME_LEVEL_USER_NODE = exports.PARENT_MENU_NODE = exports.NO_SUBORDINATES_NODE = exports.NO_FOLLOWER_NODE = exports.MENU_ITEM_NOE = exports.MENU_ASSESS_TEMPLATE = exports.MENU_ASSESS_MANAGE = exports.LOADING_NODE = exports.GROUP_NAME_NODE = exports.FOLLOWER_NODE = exports.DEPART_NODE = exports.COMPANY_NODE = exports.COMPANY_ALL_NODE = void 0;
6
+ exports.USER_NODE = exports.USER_CONCERN_NODE = exports.TONGJI_NODE = exports.SUMMARY_USER_CONCERN_NODE = exports.SUMMARY_FOLLOWER_NODE = exports.SUB_MENU_ITEM_NOE = exports.SUBORDINATES_NODE = exports.SHARE_NODE = exports.SAME_LEVEL_USER_NODE = exports.PARENT_MENU_NODE = exports.NO_SUBORDINATES_NODE = exports.NO_FOLLOWER_NODE = exports.MYOKR = exports.MENU_ITEM_NOE = exports.MENU_ASSESS_TEMPLATE = exports.MENU_ASSESS_MANAGE = exports.LOADING_NODE = exports.GROUP_NAME_NODE = exports.FOLLOWER_NODE = exports.DEPART_NODE = exports.COMPANY_NODE = exports.COMPANY_ALL_NODE = void 0;
7
7
  exports["default"] = _default;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _subMenuItem = _interopRequireDefault(require("./sub-menu-item"));
@@ -113,6 +113,11 @@ function _default(node, level, _ref) {
113
113
  level: level,
114
114
  onExpand: onExpand
115
115
  }));
116
+ case MYOKR:
117
+ return /*#__PURE__*/_react["default"].createElement(_summaryTongji["default"], _extends({}, node, {
118
+ level: level,
119
+ onExpand: onExpand
120
+ }));
116
121
  case SUMMARY_USER_CONCERN_NODE:
117
122
  return /*#__PURE__*/_react["default"].createElement(_summaryUserConcern["default"], _extends({}, node, {
118
123
  level: level,
@@ -123,6 +128,8 @@ function _default(node, level, _ref) {
123
128
  }
124
129
  var USER_NODE = "user";
125
130
  exports.USER_NODE = USER_NODE;
131
+ var MYOKR = 'myokr';
132
+ exports.MYOKR = MYOKR;
126
133
  var LOADING_NODE = "loading";
127
134
  exports.LOADING_NODE = LOADING_NODE;
128
135
  var FOLLOWER_NODE = "follower";
@@ -66,6 +66,7 @@ var okrMenus = /*#__PURE__*/function () {
66
66
  icon: 'okr',
67
67
  label: _i18n.locale.menu_myokr,
68
68
  key: this.MYOKR,
69
+ type: this.MYOKR,
69
70
  href: '',
70
71
  children: [{
71
72
  icon: '',
@@ -89,6 +90,7 @@ var okrMenus = /*#__PURE__*/function () {
89
90
  icon: 'caidan-xiashu',
90
91
  label: _i18n.locale.menu_subordinate,
91
92
  key: this.SUBORDINATES,
93
+ type: this.SUBORDINATES,
92
94
  isLeaf: false,
93
95
  children: [],
94
96
  href: '',
@@ -290,8 +290,9 @@ var tooltipHtmlRenderer = function tooltipHtmlRenderer(params) {
290
290
  }, params.value),
291
291
  placement: "top"
292
292
  }, /*#__PURE__*/_react["default"].createElement("div", {
293
- className: "".concat(preCls, "__html-container editor-style")
293
+ className: "".concat(preCls, "__html-container")
294
294
  }, isHtmlValue ? /*#__PURE__*/_react["default"].createElement("div", {
295
+ className: "editor-style",
295
296
  dangerouslySetInnerHTML: {
296
297
  __html: params.value
297
298
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@titaui/pc",
3
- "version": "1.16.81",
3
+ "version": "1.16.83-beta.1",
4
4
  "nameCN": "",
5
5
  "description": "",
6
6
  "main": "lib/index.js",