@zgfe/modules-settings 2.0.0-zhongyuan.6 → 2.0.0-zhongyuan.8

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.
@@ -197,7 +197,6 @@ var DocumentSetting = function DocumentSetting() {
197
197
  accept: '.zip,.rar,.7z',
198
198
  beforeUpload: beforeUpload,
199
199
  onChange: function onChange(info) {
200
- console.log(info);
201
200
  var status = info.file.status;
202
201
  if (status !== 'uploading') {
203
202
  if (info.fileList.length > 0) {
@@ -312,16 +311,30 @@ var DocumentSetting = function DocumentSetting() {
312
311
  };
313
312
  var saveShare = function saveShare() {
314
313
  var _currentObj$current4;
314
+ var currentId = undefined;
315
+ if (currentShareType == 1) {
316
+ // 应用
317
+ var a = projectList.filter(function (o) {
318
+ return currentAppArr.includes(o.projectId);
319
+ });
320
+ currentId = a.map(function (o) {
321
+ var _o$appList, _o$appList$;
322
+ return (_o$appList = o.appList) === null || _o$appList === void 0 ? void 0 : (_o$appList$ = _o$appList[0]) === null || _o$appList$ === void 0 ? void 0 : _o$appList$.appId;
323
+ });
324
+ } else if (currentShareType == 2) {
325
+ // 用户
326
+ currentId = currentUserArr;
327
+ }
315
328
  request(apis.setting.shareAPP, {
316
329
  method: 'post',
317
330
  data: {
318
331
  type: currentShareType,
319
332
  id: (_currentObj$current4 = currentObj.current) === null || _currentObj$current4 === void 0 ? void 0 : _currentObj$current4.id,
320
- shareIds: currentShareType == 1 ? currentAppArr : currentUserArr
333
+ shareIds: currentId
321
334
  }
322
335
  }).then(function (res) {
323
336
  if (res && (res === null || res === void 0 ? void 0 : res.code) == '100000') {
324
- message.error('分享成功!');
337
+ message.success('分享成功!');
325
338
  handleShareCancel();
326
339
  } else {
327
340
  message.error('查询失败,联系管理员');
@@ -432,9 +445,9 @@ var DocumentSetting = function DocumentSetting() {
432
445
  size: 20
433
446
  }, /*#__PURE__*/React.createElement(Radio, {
434
447
  value: 4
435
- }, "\u6240\u4EE5\u6210\u5458"), /*#__PURE__*/React.createElement(Radio, {
448
+ }, "\u6240\u6709\u6210\u5458"), /*#__PURE__*/React.createElement(Radio, {
436
449
  value: 1
437
- }, "\u6307\u5B9A\u5E94\u7528\uFF08\u6240\u6709\u62E5\u6709\u8BE5\u5E94\u7528\u6743\u9650\u7684\u89D2\u8272\uFF09"), currentShareType == 1 ? (/*#__PURE__*/React.createElement(React.Fragment, null, currentAppArr.length > 2 ? (/*#__PURE__*/React.createElement(Tooltip, {
450
+ }, "\u6307\u5B9A\u5E94\u7528\uFF08\u6240\u6709\u62E5\u6709\u8BE5\u5E94\u7528\u6743\u9650\u7684\u89D2\u8272\uFF09"), currentShareType == 1 ? (/*#__PURE__*/React.createElement(React.Fragment, null, currentAppArr.length > 0 ? (/*#__PURE__*/React.createElement(Tooltip, {
438
451
  title: function title() {
439
452
  return projectList.filter(function (o) {
440
453
  return currentAppArr.includes(o.projectId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/modules-settings",
3
- "version": "2.0.0-zhongyuan.6",
3
+ "version": "2.0.0-zhongyuan.8",
4
4
  "private": false,
5
5
  "module": "es/index.js",
6
6
  "typings": "es/index.d.ts",