@bit-sun/business-component 2.4.9 → 2.4.11
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/dist/components/Business/JsonQueryTable/static.d.ts +1 -0
- package/dist/index.esm.js +65 -14
- package/dist/index.js +65 -14
- package/dist/utils/utils.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/Business/DetailPageWrapper/index.tsx +3 -2
- package/src/components/Business/JsonQueryTable/static.ts +24 -0
- package/src/components/Business/TreeSearchSelect/utils.ts +11 -0
- package/src/components/Functional/SearchSelect/index.tsx +10 -5
- package/src/components/Functional/TreeSearchSelect/index.tsx +5 -4
- package/src/utils/utils.ts +6 -2
package/dist/index.esm.js
CHANGED
|
@@ -1279,9 +1279,13 @@ var formatter = function formatter(data, parentAuthority, parentName) {
|
|
|
1279
1279
|
});
|
|
1280
1280
|
};
|
|
1281
1281
|
var memoizeOneFormatter = index$1(formatter, isEqual);
|
|
1282
|
-
var go2BackAndClose = function go2BackAndClose() {
|
|
1282
|
+
var go2BackAndClose = function go2BackAndClose(backHistoryPath) {
|
|
1283
1283
|
localStorage.setItem(ENUM.BROWSER_CACHE.CHILD_APP_BACK, 1);
|
|
1284
|
-
|
|
1284
|
+
if (backHistoryPath) {
|
|
1285
|
+
history.push(backHistoryPath);
|
|
1286
|
+
} else {
|
|
1287
|
+
history.goBack();
|
|
1288
|
+
}
|
|
1285
1289
|
};
|
|
1286
1290
|
/**
|
|
1287
1291
|
* 处理bssulaTable的公共回显样式
|
|
@@ -2754,7 +2758,9 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
2754
2758
|
_ref$extralHeaders = _ref.extralHeaders,
|
|
2755
2759
|
extralHeaders = _ref$extralHeaders === void 0 ? {} : _ref$extralHeaders,
|
|
2756
2760
|
_ref$specialBracket = _ref.specialBracket,
|
|
2757
|
-
specialBracket = _ref$specialBracket === void 0 ? false : _ref$specialBracket
|
|
2761
|
+
specialBracket = _ref$specialBracket === void 0 ? false : _ref$specialBracket,
|
|
2762
|
+
_ref$noNeedSplit = _ref.noNeedSplit,
|
|
2763
|
+
noNeedSplit = _ref$noNeedSplit === void 0 ? false : _ref$noNeedSplit;
|
|
2758
2764
|
var resultSourceKey = handleSourceName(sourceName || (requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.sourceName) || 'supplierCode');
|
|
2759
2765
|
var selectMode = selectProps === null || selectProps === void 0 ? void 0 : selectProps.mode; // 设定当前选择器 为单选或者多选模式 无设定为单选模式(默认)
|
|
2760
2766
|
var initVal = value || (selectMode ? [] : null);
|
|
@@ -3536,9 +3542,13 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
3536
3542
|
})
|
|
3537
3543
|
}, "+ ".concat(selectedValues === null || selectedValues === void 0 ? void 0 : selectedValues.length));
|
|
3538
3544
|
};
|
|
3539
|
-
var handleSelectOptionsShowValue = function handleSelectOptionsShowValue(specialBracket, item) {
|
|
3545
|
+
var handleSelectOptionsShowValue = function handleSelectOptionsShowValue(specialBracket, noNeedSplit, item) {
|
|
3540
3546
|
var showText = Array.isArray(item.textShowText) && item.textShowText.join(' ') || item.textShowText;
|
|
3541
|
-
|
|
3547
|
+
if (noNeedSplit) {
|
|
3548
|
+
return item.text;
|
|
3549
|
+
} else {
|
|
3550
|
+
return specialBracket ? "\u3010".concat(item.textShowKey, "\u3011").concat(showText) : "".concat(item.textShowKey, " ").concat(showText);
|
|
3551
|
+
}
|
|
3542
3552
|
};
|
|
3543
3553
|
return /*#__PURE__*/React.createElement("div", {
|
|
3544
3554
|
className: 'search_select'
|
|
@@ -3609,7 +3619,7 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
3609
3619
|
key: item.value,
|
|
3610
3620
|
label: item.text
|
|
3611
3621
|
}, LightHeightOption({
|
|
3612
|
-
text: handleSelectOptionsShowValue(specialBracket, item),
|
|
3622
|
+
text: handleSelectOptionsShowValue(specialBracket, noNeedSplit, item),
|
|
3613
3623
|
filterTxt: searchValue
|
|
3614
3624
|
}));
|
|
3615
3625
|
})), needModalTable && /*#__PURE__*/React.createElement(Button, {
|
|
@@ -10167,9 +10177,11 @@ var TreeSearchSelect = function TreeSearchSelect(props) {
|
|
|
10167
10177
|
_remoteSource$resKeyV = remoteSource.resKeyValue,
|
|
10168
10178
|
resKeyValue = _remoteSource$resKeyV === void 0 ? ['id', 'name'] : _remoteSource$resKeyV,
|
|
10169
10179
|
_remoteSource$initial = remoteSource.initialParams,
|
|
10170
|
-
initialParams = _remoteSource$initial === void 0 ? {} : _remoteSource$initial
|
|
10180
|
+
initialParams = _remoteSource$initial === void 0 ? {} : _remoteSource$initial,
|
|
10181
|
+
_remoteSource$treeChi = remoteSource.treeChildrenRoom,
|
|
10182
|
+
treeChildrenRoom = _remoteSource$treeChi === void 0 ? 'children' : _remoteSource$treeChi;
|
|
10171
10183
|
var mapSearchTree = function mapSearchTree(treeDataItem) {
|
|
10172
|
-
var haveChildren = Array.isArray(treeDataItem
|
|
10184
|
+
var haveChildren = Array.isArray(treeDataItem[treeChildrenRoom]) && treeDataItem[treeChildrenRoom].length > 0; // 盘算是否为父节点
|
|
10173
10185
|
var isRoot = (treeDataItem === null || treeDataItem === void 0 ? void 0 : treeDataItem.id) == '0'; // 判断是否为根节点
|
|
10174
10186
|
return {
|
|
10175
10187
|
title: treeDataItem[resKeyValue[1]],
|
|
@@ -10179,7 +10191,7 @@ var TreeSearchSelect = function TreeSearchSelect(props) {
|
|
|
10179
10191
|
data: _objectSpread2({}, treeDataItem),
|
|
10180
10192
|
isLeaf: !haveChildren,
|
|
10181
10193
|
disabled: isDisabled(haveChildren, isRoot),
|
|
10182
|
-
children: haveChildren ? treeDataItem.
|
|
10194
|
+
children: haveChildren ? treeDataItem[treeChildrenRoom].map(function (i) {
|
|
10183
10195
|
return mapSearchTree(i);
|
|
10184
10196
|
}) : []
|
|
10185
10197
|
};
|
|
@@ -10267,8 +10279,8 @@ var TreeSearchSelect = function TreeSearchSelect(props) {
|
|
|
10267
10279
|
var parallelData = function parallelData(data, result) {
|
|
10268
10280
|
data.forEach(function (i) {
|
|
10269
10281
|
result.push(i);
|
|
10270
|
-
if (i
|
|
10271
|
-
parallelData(i
|
|
10282
|
+
if (i[treeChildrenRoom]) {
|
|
10283
|
+
parallelData(i[treeChildrenRoom], result);
|
|
10272
10284
|
}
|
|
10273
10285
|
});
|
|
10274
10286
|
return result;
|
|
@@ -10462,6 +10474,16 @@ var handleDefaultProps = function handleDefaultProps(type, otherRequestConfig) {
|
|
|
10462
10474
|
}, otherRequestConfig)
|
|
10463
10475
|
};
|
|
10464
10476
|
break;
|
|
10477
|
+
case 'market-channel':
|
|
10478
|
+
result = {
|
|
10479
|
+
isChoose: true,
|
|
10480
|
+
remoteSource: _objectSpread2({
|
|
10481
|
+
url: "/channel-manage/channelInfo/tree",
|
|
10482
|
+
headers: otherRequestConfig === null || otherRequestConfig === void 0 ? void 0 : otherRequestConfig.extralHeaders,
|
|
10483
|
+
resKeyValue: ['code', 'name']
|
|
10484
|
+
}, otherRequestConfig)
|
|
10485
|
+
};
|
|
10486
|
+
break;
|
|
10465
10487
|
default:
|
|
10466
10488
|
result = {
|
|
10467
10489
|
treeCheckable: true,
|
|
@@ -11958,7 +11980,8 @@ var DetailWrapper = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
11958
11980
|
_ref$donotNeedShowScr = _ref.donotNeedShowScreenIcon,
|
|
11959
11981
|
donotNeedShowScreenIcon = _ref$donotNeedShowScr === void 0 ? false : _ref$donotNeedShowScr,
|
|
11960
11982
|
title = _ref.title,
|
|
11961
|
-
pathToRegexp = _ref.pathToRegexp
|
|
11983
|
+
pathToRegexp = _ref.pathToRegexp,
|
|
11984
|
+
backHistoryPath = _ref.backHistoryPath;
|
|
11962
11985
|
var _useState3 = useState(false),
|
|
11963
11986
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
11964
11987
|
isFullScreen = _useState4[0],
|
|
@@ -12082,7 +12105,7 @@ var DetailWrapper = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
12082
12105
|
}, /*#__PURE__*/React.createElement("div", {
|
|
12083
12106
|
className: 'back_home_img_content',
|
|
12084
12107
|
onClick: function onClick() {
|
|
12085
|
-
go2BackAndClose();
|
|
12108
|
+
go2BackAndClose(backHistoryPath);
|
|
12086
12109
|
// history.goBack();
|
|
12087
12110
|
}
|
|
12088
12111
|
}, /*#__PURE__*/React.createElement(ArrowLeftOutlined, null)), /*#__PURE__*/React.createElement("div", {
|
|
@@ -24624,6 +24647,19 @@ var inputTypes = {
|
|
|
24624
24647
|
filter: 'qp-name,code-orGroup-in'
|
|
24625
24648
|
}
|
|
24626
24649
|
})
|
|
24650
|
+
},
|
|
24651
|
+
370: {
|
|
24652
|
+
type: 'bs-marketChannelSelect',
|
|
24653
|
+
props: _objectSpread2({
|
|
24654
|
+
treeCheckable: false,
|
|
24655
|
+
requestConfig: {
|
|
24656
|
+
treeChildrenRoom: 'channelInfoSon',
|
|
24657
|
+
initialParams: {
|
|
24658
|
+
'qp-isMain-eq': 1,
|
|
24659
|
+
'qp-type-eq': 1
|
|
24660
|
+
}
|
|
24661
|
+
}
|
|
24662
|
+
}, normalSingleSelectProps)
|
|
24627
24663
|
}
|
|
24628
24664
|
},
|
|
24629
24665
|
30: {
|
|
@@ -24789,6 +24825,20 @@ var inputTypes = {
|
|
|
24789
24825
|
filter: 'qp-name,code-orGroup-in'
|
|
24790
24826
|
}
|
|
24791
24827
|
})
|
|
24828
|
+
},
|
|
24829
|
+
370: {
|
|
24830
|
+
type: 'bs-marketChannelSelect',
|
|
24831
|
+
props: _objectSpread2({
|
|
24832
|
+
treeCheckable: true,
|
|
24833
|
+
treeCheckStrictly: true,
|
|
24834
|
+
requestConfig: {
|
|
24835
|
+
treeChildrenRoom: 'channelInfoSon',
|
|
24836
|
+
initialParams: {
|
|
24837
|
+
'qp-isMain-eq': 1,
|
|
24838
|
+
'qp-type-eq': 1
|
|
24839
|
+
}
|
|
24840
|
+
}
|
|
24841
|
+
}, normalSingleSelectProps)
|
|
24792
24842
|
}
|
|
24793
24843
|
}
|
|
24794
24844
|
};
|
|
@@ -24821,7 +24871,8 @@ var choiceType = Object.freeze({
|
|
|
24821
24871
|
330: '变量',
|
|
24822
24872
|
340: '规则模板选择器',
|
|
24823
24873
|
350: '营销区域选择器',
|
|
24824
|
-
360: '角色选择器'
|
|
24874
|
+
360: '角色选择器',
|
|
24875
|
+
370: '销售渠道选择器'
|
|
24825
24876
|
});
|
|
24826
24877
|
var inputType = {
|
|
24827
24878
|
10: '输入',
|
package/dist/index.js
CHANGED
|
@@ -1299,9 +1299,13 @@ var formatter = function formatter(data, parentAuthority, parentName) {
|
|
|
1299
1299
|
});
|
|
1300
1300
|
};
|
|
1301
1301
|
var memoizeOneFormatter = index$1(formatter, isEqual__default['default']);
|
|
1302
|
-
var go2BackAndClose = function go2BackAndClose() {
|
|
1302
|
+
var go2BackAndClose = function go2BackAndClose(backHistoryPath) {
|
|
1303
1303
|
localStorage.setItem(ENUM.BROWSER_CACHE.CHILD_APP_BACK, 1);
|
|
1304
|
-
|
|
1304
|
+
if (backHistoryPath) {
|
|
1305
|
+
umi.history.push(backHistoryPath);
|
|
1306
|
+
} else {
|
|
1307
|
+
umi.history.goBack();
|
|
1308
|
+
}
|
|
1305
1309
|
};
|
|
1306
1310
|
/**
|
|
1307
1311
|
* 处理bssulaTable的公共回显样式
|
|
@@ -2774,7 +2778,9 @@ var SearchSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
2774
2778
|
_ref$extralHeaders = _ref.extralHeaders,
|
|
2775
2779
|
extralHeaders = _ref$extralHeaders === void 0 ? {} : _ref$extralHeaders,
|
|
2776
2780
|
_ref$specialBracket = _ref.specialBracket,
|
|
2777
|
-
specialBracket = _ref$specialBracket === void 0 ? false : _ref$specialBracket
|
|
2781
|
+
specialBracket = _ref$specialBracket === void 0 ? false : _ref$specialBracket,
|
|
2782
|
+
_ref$noNeedSplit = _ref.noNeedSplit,
|
|
2783
|
+
noNeedSplit = _ref$noNeedSplit === void 0 ? false : _ref$noNeedSplit;
|
|
2778
2784
|
var resultSourceKey = handleSourceName(sourceName || (requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.sourceName) || 'supplierCode');
|
|
2779
2785
|
var selectMode = selectProps === null || selectProps === void 0 ? void 0 : selectProps.mode; // 设定当前选择器 为单选或者多选模式 无设定为单选模式(默认)
|
|
2780
2786
|
var initVal = value || (selectMode ? [] : null);
|
|
@@ -3556,9 +3562,13 @@ var SearchSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
3556
3562
|
})
|
|
3557
3563
|
}, "+ ".concat(selectedValues === null || selectedValues === void 0 ? void 0 : selectedValues.length));
|
|
3558
3564
|
};
|
|
3559
|
-
var handleSelectOptionsShowValue = function handleSelectOptionsShowValue(specialBracket, item) {
|
|
3565
|
+
var handleSelectOptionsShowValue = function handleSelectOptionsShowValue(specialBracket, noNeedSplit, item) {
|
|
3560
3566
|
var showText = Array.isArray(item.textShowText) && item.textShowText.join(' ') || item.textShowText;
|
|
3561
|
-
|
|
3567
|
+
if (noNeedSplit) {
|
|
3568
|
+
return item.text;
|
|
3569
|
+
} else {
|
|
3570
|
+
return specialBracket ? "\u3010".concat(item.textShowKey, "\u3011").concat(showText) : "".concat(item.textShowKey, " ").concat(showText);
|
|
3571
|
+
}
|
|
3562
3572
|
};
|
|
3563
3573
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
3564
3574
|
className: 'search_select'
|
|
@@ -3629,7 +3639,7 @@ var SearchSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
3629
3639
|
key: item.value,
|
|
3630
3640
|
label: item.text
|
|
3631
3641
|
}, LightHeightOption({
|
|
3632
|
-
text: handleSelectOptionsShowValue(specialBracket, item),
|
|
3642
|
+
text: handleSelectOptionsShowValue(specialBracket, noNeedSplit, item),
|
|
3633
3643
|
filterTxt: searchValue
|
|
3634
3644
|
}));
|
|
3635
3645
|
})), needModalTable && /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
@@ -10187,9 +10197,11 @@ var TreeSearchSelect = function TreeSearchSelect(props) {
|
|
|
10187
10197
|
_remoteSource$resKeyV = remoteSource.resKeyValue,
|
|
10188
10198
|
resKeyValue = _remoteSource$resKeyV === void 0 ? ['id', 'name'] : _remoteSource$resKeyV,
|
|
10189
10199
|
_remoteSource$initial = remoteSource.initialParams,
|
|
10190
|
-
initialParams = _remoteSource$initial === void 0 ? {} : _remoteSource$initial
|
|
10200
|
+
initialParams = _remoteSource$initial === void 0 ? {} : _remoteSource$initial,
|
|
10201
|
+
_remoteSource$treeChi = remoteSource.treeChildrenRoom,
|
|
10202
|
+
treeChildrenRoom = _remoteSource$treeChi === void 0 ? 'children' : _remoteSource$treeChi;
|
|
10191
10203
|
var mapSearchTree = function mapSearchTree(treeDataItem) {
|
|
10192
|
-
var haveChildren = Array.isArray(treeDataItem
|
|
10204
|
+
var haveChildren = Array.isArray(treeDataItem[treeChildrenRoom]) && treeDataItem[treeChildrenRoom].length > 0; // 盘算是否为父节点
|
|
10193
10205
|
var isRoot = (treeDataItem === null || treeDataItem === void 0 ? void 0 : treeDataItem.id) == '0'; // 判断是否为根节点
|
|
10194
10206
|
return {
|
|
10195
10207
|
title: treeDataItem[resKeyValue[1]],
|
|
@@ -10199,7 +10211,7 @@ var TreeSearchSelect = function TreeSearchSelect(props) {
|
|
|
10199
10211
|
data: _objectSpread2({}, treeDataItem),
|
|
10200
10212
|
isLeaf: !haveChildren,
|
|
10201
10213
|
disabled: isDisabled(haveChildren, isRoot),
|
|
10202
|
-
children: haveChildren ? treeDataItem.
|
|
10214
|
+
children: haveChildren ? treeDataItem[treeChildrenRoom].map(function (i) {
|
|
10203
10215
|
return mapSearchTree(i);
|
|
10204
10216
|
}) : []
|
|
10205
10217
|
};
|
|
@@ -10287,8 +10299,8 @@ var TreeSearchSelect = function TreeSearchSelect(props) {
|
|
|
10287
10299
|
var parallelData = function parallelData(data, result) {
|
|
10288
10300
|
data.forEach(function (i) {
|
|
10289
10301
|
result.push(i);
|
|
10290
|
-
if (i
|
|
10291
|
-
parallelData(i
|
|
10302
|
+
if (i[treeChildrenRoom]) {
|
|
10303
|
+
parallelData(i[treeChildrenRoom], result);
|
|
10292
10304
|
}
|
|
10293
10305
|
});
|
|
10294
10306
|
return result;
|
|
@@ -10482,6 +10494,16 @@ var handleDefaultProps = function handleDefaultProps(type, otherRequestConfig) {
|
|
|
10482
10494
|
}, otherRequestConfig)
|
|
10483
10495
|
};
|
|
10484
10496
|
break;
|
|
10497
|
+
case 'market-channel':
|
|
10498
|
+
result = {
|
|
10499
|
+
isChoose: true,
|
|
10500
|
+
remoteSource: _objectSpread2({
|
|
10501
|
+
url: "/channel-manage/channelInfo/tree",
|
|
10502
|
+
headers: otherRequestConfig === null || otherRequestConfig === void 0 ? void 0 : otherRequestConfig.extralHeaders,
|
|
10503
|
+
resKeyValue: ['code', 'name']
|
|
10504
|
+
}, otherRequestConfig)
|
|
10505
|
+
};
|
|
10506
|
+
break;
|
|
10485
10507
|
default:
|
|
10486
10508
|
result = {
|
|
10487
10509
|
treeCheckable: true,
|
|
@@ -11978,7 +12000,8 @@ var DetailWrapper = /*#__PURE__*/React__default['default'].memo(function (_ref)
|
|
|
11978
12000
|
_ref$donotNeedShowScr = _ref.donotNeedShowScreenIcon,
|
|
11979
12001
|
donotNeedShowScreenIcon = _ref$donotNeedShowScr === void 0 ? false : _ref$donotNeedShowScr,
|
|
11980
12002
|
title = _ref.title,
|
|
11981
|
-
pathToRegexp = _ref.pathToRegexp
|
|
12003
|
+
pathToRegexp = _ref.pathToRegexp,
|
|
12004
|
+
backHistoryPath = _ref.backHistoryPath;
|
|
11982
12005
|
var _useState3 = React.useState(false),
|
|
11983
12006
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
11984
12007
|
isFullScreen = _useState4[0],
|
|
@@ -12102,7 +12125,7 @@ var DetailWrapper = /*#__PURE__*/React__default['default'].memo(function (_ref)
|
|
|
12102
12125
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
12103
12126
|
className: 'back_home_img_content',
|
|
12104
12127
|
onClick: function onClick() {
|
|
12105
|
-
go2BackAndClose();
|
|
12128
|
+
go2BackAndClose(backHistoryPath);
|
|
12106
12129
|
// history.goBack();
|
|
12107
12130
|
}
|
|
12108
12131
|
}, /*#__PURE__*/React__default['default'].createElement(icons.ArrowLeftOutlined, null)), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
@@ -24644,6 +24667,19 @@ var inputTypes = {
|
|
|
24644
24667
|
filter: 'qp-name,code-orGroup-in'
|
|
24645
24668
|
}
|
|
24646
24669
|
})
|
|
24670
|
+
},
|
|
24671
|
+
370: {
|
|
24672
|
+
type: 'bs-marketChannelSelect',
|
|
24673
|
+
props: _objectSpread2({
|
|
24674
|
+
treeCheckable: false,
|
|
24675
|
+
requestConfig: {
|
|
24676
|
+
treeChildrenRoom: 'channelInfoSon',
|
|
24677
|
+
initialParams: {
|
|
24678
|
+
'qp-isMain-eq': 1,
|
|
24679
|
+
'qp-type-eq': 1
|
|
24680
|
+
}
|
|
24681
|
+
}
|
|
24682
|
+
}, normalSingleSelectProps)
|
|
24647
24683
|
}
|
|
24648
24684
|
},
|
|
24649
24685
|
30: {
|
|
@@ -24809,6 +24845,20 @@ var inputTypes = {
|
|
|
24809
24845
|
filter: 'qp-name,code-orGroup-in'
|
|
24810
24846
|
}
|
|
24811
24847
|
})
|
|
24848
|
+
},
|
|
24849
|
+
370: {
|
|
24850
|
+
type: 'bs-marketChannelSelect',
|
|
24851
|
+
props: _objectSpread2({
|
|
24852
|
+
treeCheckable: true,
|
|
24853
|
+
treeCheckStrictly: true,
|
|
24854
|
+
requestConfig: {
|
|
24855
|
+
treeChildrenRoom: 'channelInfoSon',
|
|
24856
|
+
initialParams: {
|
|
24857
|
+
'qp-isMain-eq': 1,
|
|
24858
|
+
'qp-type-eq': 1
|
|
24859
|
+
}
|
|
24860
|
+
}
|
|
24861
|
+
}, normalSingleSelectProps)
|
|
24812
24862
|
}
|
|
24813
24863
|
}
|
|
24814
24864
|
};
|
|
@@ -24841,7 +24891,8 @@ var choiceType = Object.freeze({
|
|
|
24841
24891
|
330: '变量',
|
|
24842
24892
|
340: '规则模板选择器',
|
|
24843
24893
|
350: '营销区域选择器',
|
|
24844
|
-
360: '角色选择器'
|
|
24894
|
+
360: '角色选择器',
|
|
24895
|
+
370: '销售渠道选择器'
|
|
24845
24896
|
});
|
|
24846
24897
|
var inputType = {
|
|
24847
24898
|
10: '输入',
|
package/dist/utils/utils.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare function downloadExcel(data: any, fileName?: any, isResUrl?: boolean): void;
|
|
2
2
|
export declare const formatter: (data: any, parentAuthority: any, parentName: any) => any;
|
|
3
3
|
export declare const memoizeOneFormatter: any;
|
|
4
|
-
export declare const go2BackAndClose: () => void;
|
|
4
|
+
export declare const go2BackAndClose: (backHistoryPath: any) => void;
|
|
5
5
|
/**
|
|
6
6
|
* 处理bssulaTable的公共回显样式
|
|
7
7
|
* @param col 每一具体行
|
package/package.json
CHANGED
|
@@ -63,6 +63,7 @@ const DetailWrapper = React.memo(
|
|
|
63
63
|
donotNeedShowScreenIcon=false,
|
|
64
64
|
title,
|
|
65
65
|
pathToRegexp,
|
|
66
|
+
backHistoryPath,
|
|
66
67
|
}: any) => {
|
|
67
68
|
const [isFullScreen, setIsFnllScreen]: any = useState(false);
|
|
68
69
|
const [breadcrumbArr, setBreadCrumbArr]: any = useState([]);
|
|
@@ -218,7 +219,7 @@ const DetailWrapper = React.memo(
|
|
|
218
219
|
<div
|
|
219
220
|
className={'back_home_img_content'}
|
|
220
221
|
onClick={() => {
|
|
221
|
-
go2BackAndClose();
|
|
222
|
+
go2BackAndClose(backHistoryPath);
|
|
222
223
|
// history.goBack();
|
|
223
224
|
}}
|
|
224
225
|
>
|
|
@@ -311,4 +312,4 @@ const DetailWrapper = React.memo(
|
|
|
311
312
|
}
|
|
312
313
|
return true;
|
|
313
314
|
},
|
|
314
|
-
);
|
|
315
|
+
);
|
|
@@ -178,6 +178,17 @@ export const inputTypes:any = {
|
|
|
178
178
|
},
|
|
179
179
|
},
|
|
180
180
|
},
|
|
181
|
+
370: {
|
|
182
|
+
type: 'bs-marketChannelSelect',
|
|
183
|
+
props: {
|
|
184
|
+
treeCheckable: false,
|
|
185
|
+
requestConfig: {
|
|
186
|
+
treeChildrenRoom: 'channelInfoSon',
|
|
187
|
+
initialParams: { 'qp-isMain-eq': 1, 'qp-type-eq': 1 },
|
|
188
|
+
},
|
|
189
|
+
...normalSingleSelectProps,
|
|
190
|
+
},
|
|
191
|
+
},
|
|
181
192
|
},
|
|
182
193
|
30: {
|
|
183
194
|
10: {
|
|
@@ -361,6 +372,18 @@ export const inputTypes:any = {
|
|
|
361
372
|
},
|
|
362
373
|
},
|
|
363
374
|
},
|
|
375
|
+
370: {
|
|
376
|
+
type: 'bs-marketChannelSelect',
|
|
377
|
+
props: {
|
|
378
|
+
treeCheckable: true,
|
|
379
|
+
treeCheckStrictly: true,
|
|
380
|
+
requestConfig: {
|
|
381
|
+
treeChildrenRoom: 'channelInfoSon',
|
|
382
|
+
initialParams: { 'qp-isMain-eq': 1, 'qp-type-eq': 1 }
|
|
383
|
+
},
|
|
384
|
+
...normalSingleSelectProps,
|
|
385
|
+
},
|
|
386
|
+
},
|
|
364
387
|
},
|
|
365
388
|
};
|
|
366
389
|
|
|
@@ -403,6 +426,7 @@ export const choiceType = Object.freeze({
|
|
|
403
426
|
340: '规则模板选择器',
|
|
404
427
|
350: '营销区域选择器',
|
|
405
428
|
360: '角色选择器',
|
|
429
|
+
370: '销售渠道选择器',
|
|
406
430
|
});
|
|
407
431
|
export const inputType:any ={
|
|
408
432
|
10: '输入',
|
|
@@ -73,6 +73,17 @@ const handleDefaultProps = (type: string, otherRequestConfig: {extralHeaders?: s
|
|
|
73
73
|
},
|
|
74
74
|
};
|
|
75
75
|
break;
|
|
76
|
+
case 'market-channel':
|
|
77
|
+
result = {
|
|
78
|
+
isChoose: true,
|
|
79
|
+
remoteSource: {
|
|
80
|
+
url: `/channel-manage/channelInfo/tree`,
|
|
81
|
+
headers: otherRequestConfig?.extralHeaders,
|
|
82
|
+
resKeyValue: ['code', 'name'],
|
|
83
|
+
...otherRequestConfig,
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
break;
|
|
76
87
|
default:
|
|
77
88
|
result = {
|
|
78
89
|
treeCheckable: true,
|
|
@@ -42,6 +42,7 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
|
|
|
42
42
|
init = true,// 是否初始请求
|
|
43
43
|
extralHeaders = {},// 额外请求头参数
|
|
44
44
|
specialBracket = false,// 是否使用特殊括弧显示选项 【value】text
|
|
45
|
+
noNeedSplit = false,// label显示不需要任何特殊化
|
|
45
46
|
} = requestConfig || {};
|
|
46
47
|
const resultSourceKey = handleSourceName(sourceName || requestConfig?.sourceName || 'supplierCode')
|
|
47
48
|
|
|
@@ -736,12 +737,16 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
|
|
|
736
737
|
)
|
|
737
738
|
}
|
|
738
739
|
|
|
739
|
-
const handleSelectOptionsShowValue = (specialBracket: boolean, item: object) => {
|
|
740
|
+
const handleSelectOptionsShowValue = (specialBracket: boolean, noNeedSplit: boolean, item: object) => {
|
|
740
741
|
let showText = Array.isArray(item.textShowText) &&
|
|
741
742
|
item.textShowText.join(' ') || item.textShowText;
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
743
|
+
if (noNeedSplit) {
|
|
744
|
+
return item.text;
|
|
745
|
+
} else {
|
|
746
|
+
return specialBracket
|
|
747
|
+
? `【${item.textShowKey}】${showText}`
|
|
748
|
+
: `${item.textShowKey} ${showText}`
|
|
749
|
+
}
|
|
745
750
|
};
|
|
746
751
|
|
|
747
752
|
return (
|
|
@@ -794,7 +799,7 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
|
|
|
794
799
|
{items.map(item => (
|
|
795
800
|
<Option key={item.value} label={item.text}>
|
|
796
801
|
{LightHeightOption({
|
|
797
|
-
text: handleSelectOptionsShowValue(specialBracket, item),
|
|
802
|
+
text: handleSelectOptionsShowValue(specialBracket, noNeedSplit, item),
|
|
798
803
|
filterTxt: searchValue
|
|
799
804
|
})}
|
|
800
805
|
</Option>
|
|
@@ -40,10 +40,11 @@ const TreeSearchSelect = (props: any) => {
|
|
|
40
40
|
paramsKey = 'qp-name-like',
|
|
41
41
|
resKeyValue = ['id', 'name'],
|
|
42
42
|
initialParams = {},
|
|
43
|
+
treeChildrenRoom = 'children',// 树状结构的子集容器 默认为 'children'
|
|
43
44
|
} = remoteSource;
|
|
44
45
|
|
|
45
46
|
const mapSearchTree = (treeDataItem: any) => {
|
|
46
|
-
const haveChildren = Array.isArray(treeDataItem
|
|
47
|
+
const haveChildren = Array.isArray(treeDataItem[treeChildrenRoom]) && treeDataItem[treeChildrenRoom].length > 0; // 盘算是否为父节点
|
|
47
48
|
const isRoot = treeDataItem?.id == '0'; // 判断是否为根节点
|
|
48
49
|
return {
|
|
49
50
|
title: treeDataItem[resKeyValue[1]],
|
|
@@ -53,7 +54,7 @@ const TreeSearchSelect = (props: any) => {
|
|
|
53
54
|
data: { ...treeDataItem },
|
|
54
55
|
isLeaf: !haveChildren,
|
|
55
56
|
disabled: isDisabled(haveChildren,isRoot),
|
|
56
|
-
children: haveChildren ? treeDataItem.
|
|
57
|
+
children: haveChildren ? treeDataItem[treeChildrenRoom].map((i: any) => mapSearchTree(i)) : [],
|
|
57
58
|
};
|
|
58
59
|
};
|
|
59
60
|
|
|
@@ -106,8 +107,8 @@ const TreeSearchSelect = (props: any) => {
|
|
|
106
107
|
const parallelData = (data: any,result: any) => {
|
|
107
108
|
data.forEach((i: any) => {
|
|
108
109
|
result.push(i);
|
|
109
|
-
if (i
|
|
110
|
-
parallelData(i
|
|
110
|
+
if (i[treeChildrenRoom]) {
|
|
111
|
+
parallelData(i[treeChildrenRoom], result);
|
|
111
112
|
}
|
|
112
113
|
});
|
|
113
114
|
return result;
|
package/src/utils/utils.ts
CHANGED
|
@@ -60,9 +60,13 @@ export const formatter = (data, parentAuthority, parentName) => {
|
|
|
60
60
|
|
|
61
61
|
export const memoizeOneFormatter = memoizeOne(formatter, isEqual);
|
|
62
62
|
|
|
63
|
-
export const go2BackAndClose = () => {
|
|
63
|
+
export const go2BackAndClose = (backHistoryPath) => {
|
|
64
64
|
localStorage.setItem(ENUM.BROWSER_CACHE.CHILD_APP_BACK, 1);
|
|
65
|
-
|
|
65
|
+
if(backHistoryPath){
|
|
66
|
+
history.push(backHistoryPath)
|
|
67
|
+
} else {
|
|
68
|
+
history.goBack();
|
|
69
|
+
}
|
|
66
70
|
}
|
|
67
71
|
|
|
68
72
|
/**
|