@icos-desktop/react-components 1.2.0-beta.14 → 1.2.0-beta.16

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.
@@ -371,6 +371,10 @@ interface SenseManagerProps {
371
371
  * @description 默认打开台账组导入,可按视图配置对应为台账导入/台账组导入
372
372
  */
373
373
  showImportButton?: boolean | Record<string, 'book' | 'bookGroup'>;
374
+ /**
375
+ * 台账组功能导入数据隐藏根据地理层级自动匹配
376
+ */
377
+ importHiddenGeolevel?: boolean | Record<string, boolean>;
374
378
  /**
375
379
  * 台账功能
376
380
  */
@@ -8318,11 +8318,13 @@ var MatchField = function (_a) {
8318
8318
  useEffect(function () {
8319
8319
  var mapping = [];
8320
8320
  Object.keys(fieldMap).forEach(function (key) {
8321
- var _a;
8322
- if ((_a = fieldMap[key]) === null || _a === void 0 ? void 0 : _a.checked) {
8321
+ var _a, _b;
8322
+ if (((_a = fieldMap[key]) === null || _a === void 0 ? void 0 : _a.checked) || ((_b = fieldMap[key]) === null || _b === void 0 ? void 0 : _b.required)) {
8323
8323
  mapping.push({
8324
8324
  source: fieldMap[key].fieldId,
8325
8325
  target: key,
8326
+ checked: fieldMap[key].checked,
8327
+ required: fieldMap[key].required,
8326
8328
  });
8327
8329
  }
8328
8330
  });
@@ -9560,7 +9562,7 @@ var Existing = forwardRef(function (_a, ref) {
9560
9562
  }); };
9561
9563
  // 导入
9562
9564
  var handleImport = function () { return __awaiter(void 0, void 0, void 0, function () {
9563
- var bookMappingOk, senseGlobalCodes, res_1, err_2;
9565
+ var bookMappingOk, fieldMappingOk, senseGlobalCodes, res_1, err_2;
9564
9566
  var _a, _b, _c;
9565
9567
  return __generator(this, function (_d) {
9566
9568
  switch (_d.label) {
@@ -9587,6 +9589,17 @@ var Existing = forwardRef(function (_a, ref) {
9587
9589
  message.error('请设置匹配字段');
9588
9590
  return [2 /*return*/];
9589
9591
  }
9592
+ fieldMappingOk = true;
9593
+ fieldMapping.forEach(function (item) {
9594
+ console.log(item);
9595
+ if (item.required && (!item.source || !item.checked)) {
9596
+ fieldMappingOk = false;
9597
+ }
9598
+ });
9599
+ if (!fieldMappingOk) {
9600
+ message.error('请设置必填字段对应的匹配字段');
9601
+ return [2 /*return*/];
9602
+ }
9590
9603
  if (((_a = sourceData === null || sourceData === void 0 ? void 0 : sourceData.data) === null || _a === void 0 ? void 0 : _a.type) === 'sense') {
9591
9604
  senseGlobalCodes = (_b = sourceData === null || sourceData === void 0 ? void 0 : sourceData.data) === null || _b === void 0 ? void 0 : _b.keys;
9592
9605
  }
@@ -9601,7 +9614,7 @@ var Existing = forwardRef(function (_a, ref) {
9601
9614
  target: bookGroupId,
9602
9615
  },
9603
9616
  bookMapping: bookMapping,
9604
- fieldMapping: fieldMapping,
9617
+ fieldMapping: fieldMapping.map(function (item) { return ({ source: item.source, target: item.target }); }),
9605
9618
  senseGlobalCodes: senseGlobalCodes,
9606
9619
  })];
9607
9620
  case 2:
@@ -10061,7 +10074,7 @@ styleInject(css_248z$7);
10061
10074
 
10062
10075
  var SenseManager = forwardRef(function (props, ref) {
10063
10076
  var _a;
10064
- var _b = props.viewType, viewType = _b === void 0 ? 'system' : _b, _c = props.views, views = _c === void 0 ? [] : _c, showView = props.showView, showBreadcrumb = props.showBreadcrumb, showBookGroupTable = props.showBookGroupTable, showBookTable = props.showBookTable, showSenseTable = props.showSenseTable, showImportButton = props.showImportButton, bookContextMenuConfig = props.bookContextMenuConfig, senseContextMenuConfig = props.senseContextMenuConfig, enableTag = props.enableTag, leafRegionId = props.leafRegionId, pathRegionId = props.pathRegionId, onCreateSense = props.onCreateSense, onShowSense = props.onShowSense, onEditSense = props.onEditSense, onClickSense = props.onClickSense, onDoubleClickSense = props.onDoubleClickSense;
10077
+ var _b = props.viewType, viewType = _b === void 0 ? 'system' : _b, _c = props.views, views = _c === void 0 ? [] : _c, showView = props.showView, showBreadcrumb = props.showBreadcrumb, showBookGroupTable = props.showBookGroupTable, showBookTable = props.showBookTable, showSenseTable = props.showSenseTable, showImportButton = props.showImportButton, importHiddenGeolevel = props.importHiddenGeolevel, bookContextMenuConfig = props.bookContextMenuConfig, senseContextMenuConfig = props.senseContextMenuConfig, enableTag = props.enableTag, leafRegionId = props.leafRegionId, pathRegionId = props.pathRegionId, onCreateSense = props.onCreateSense, onShowSense = props.onShowSense, onEditSense = props.onEditSense, onClickSense = props.onClickSense, onDoubleClickSense = props.onDoubleClickSense;
10065
10078
  // 台账表格 ref
10066
10079
  var bookTableRef = useRef();
10067
10080
  // 实体记录表格 ref
@@ -10222,6 +10235,16 @@ var SenseManager = forwardRef(function (props, ref) {
10222
10235
  }
10223
10236
  setOpenSenseImportModal(true);
10224
10237
  };
10238
+ // 判断导入数据隐藏地理层级导入
10239
+ var hiddenGeolevel = (function () {
10240
+ if (typeof importHiddenGeolevel === 'boolean') {
10241
+ return importHiddenGeolevel;
10242
+ }
10243
+ if (typeof importHiddenGeolevel === 'object') {
10244
+ return importHiddenGeolevel === null || importHiddenGeolevel === void 0 ? void 0 : importHiddenGeolevel[activeCategory];
10245
+ }
10246
+ return false;
10247
+ })();
10225
10248
  var handleCloseSenseImportModal = function () {
10226
10249
  setOpenSenseImportModal(false);
10227
10250
  };
@@ -10299,7 +10322,7 @@ var SenseManager = forwardRef(function (props, ref) {
10299
10322
  activeCategory ? renderMain() : null),
10300
10323
  React__default.createElement(Modal, { title: "\u5BFC\u5165\u6570\u636E", width: 900, open: openSenseImportModal, onCancel: handleCloseSenseImportModal, footer: null, destroyOnClose: true },
10301
10324
  React__default.createElement("div", { style: { height: 600, marginBottom: 8 } },
10302
- React__default.createElement(SenseImport, { viewCode: activeCategory, bookGroupId: bookGroup === null || bookGroup === void 0 ? void 0 : bookGroup.bookGroupId, onCancel: handleCloseSenseImportModal, onSuccess: handleCloseSenseImportModal }))),
10325
+ React__default.createElement(SenseImport, { viewCode: activeCategory, bookGroupId: bookGroup === null || bookGroup === void 0 ? void 0 : bookGroup.bookGroupId, onCancel: handleCloseSenseImportModal, onSuccess: handleCloseSenseImportModal, hiddenGeolevel: hiddenGeolevel }))),
10303
10326
  React__default.createElement(Modal, { title: "\u5BFC\u5165\u6570\u636E", width: 600, open: openSenseUploadModal, onCancel: handleCloseSenseUploadModal, footer: null, destroyOnClose: true },
10304
10327
  React__default.createElement("div", { style: { height: 600, marginBottom: 8 } },
10305
10328
  React__default.createElement(SenseUpload, { bookId: bookGroup === null || bookGroup === void 0 ? void 0 : bookGroup.bookGroupId, onCancel: handleCloseSenseUploadModal, onSuccess: handleCloseSenseUploadModal })))));
@@ -13631,11 +13654,11 @@ var CcosVideoPlayer = function (props) {
13631
13654
  CcosVideoPlayer.settings = settings$1;
13632
13655
 
13633
13656
  try {
13634
- window._ICOS_DESKTOP_VERSION_ = JSON.parse('{"version":"1.2.0-beta.14","branch":"remotes/origin/release_v1.2.0","buildDate":"2025-02-12 10:56:10"}');
13657
+ window._ICOS_DESKTOP_VERSION_ = JSON.parse('{"version":"1.2.0-beta.16","branch":"remotes/origin/release_v1.2.0","buildDate":"2025-02-13 18:32:31"}');
13635
13658
  }
13636
13659
  catch (err) {
13637
13660
  console.warn(err);
13638
- window._ICOS_DESKTOP_VERSION_ = '{"version":"1.2.0-beta.14","branch":"remotes/origin/release_v1.2.0","buildDate":"2025-02-12 10:56:10"}';
13661
+ window._ICOS_DESKTOP_VERSION_ = '{"version":"1.2.0-beta.16","branch":"remotes/origin/release_v1.2.0","buildDate":"2025-02-13 18:32:31"}';
13639
13662
  }
13640
13663
 
13641
13664
  export { BookGroupTable, BookTable, CcosSenseCreate, CcosSenseDetail, CcosSenseEdit, CcosSenseManager, CcosSenseSearch, CcosSenseTree, CcosSenseView, CcosVideoPlayer, OrgTreeSelect, PersonSelector, ProTable$1 as ProTable, Provider, RegionTreeSelect, RelationGraph, SenseCreate, SenseDetail, SenseEdit, SenseForm, SenseImport, SenseInfo, SenseManager, SenseSearch, SenseTable, SenseTree, SenseUpload, SenseView, TagTreeSelect, VideoPlayer, setCconfig as config };