@bit-sun/business-component 3.1.10-alpha.11 → 3.1.10-alpha.12

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/index.esm.js CHANGED
@@ -31660,6 +31660,101 @@ var RuleField = /*#__PURE__*/function (_Component) {
31660
31660
  });
31661
31661
  }
31662
31662
  }
31663
+ // 行政组织选择器(按登录组织过滤)
31664
+ if (dataChoiceBusinessType == 211) {
31665
+ if (INTERVAL_TYPE.indexOf(selectOperation) > -1) {
31666
+ return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement(BusinessTreeSearchSelect$1, {
31667
+ disabled: disabled,
31668
+ treeCheckable: dataInputBusinessType === 12,
31669
+ businessType: "department",
31670
+ labelInValue: true,
31671
+ value: dataInputBusinessType === 12 ? values[0] : values[0][0],
31672
+ style: styleCommon,
31673
+ treeCheckStrictly: true,
31674
+ onChange: function onChange(value) {
31675
+ if (dataInputBusinessType === 12) {
31676
+ values[0] = value.map(function (i) {
31677
+ return i.key;
31678
+ });
31679
+ valueNames[0] = value.map(function (i) {
31680
+ return i.label || '';
31681
+ });
31682
+ } else {
31683
+ values[0] = [value.key];
31684
+ valueNames[0] = [value.label || ''];
31685
+ }
31686
+ callback(values, valueNames);
31687
+ },
31688
+ requestConfig: {
31689
+ initialParams: {
31690
+ 'orgViewCode': 'administrative-organization-view',
31691
+ 'qp-idPath-like': getCurrentTargetBgId() || ''
31692
+ }
31693
+ },
31694
+ getPopupContainer: function getPopupContainer() {
31695
+ return document.body;
31696
+ }
31697
+ }), /*#__PURE__*/React$1.createElement("span", null, "~"), /*#__PURE__*/React$1.createElement(BusinessTreeSearchSelect$1, {
31698
+ disabled: disabled,
31699
+ treeCheckable: dataInputBusinessType === 12,
31700
+ businessType: "department",
31701
+ labelInValue: true,
31702
+ value: dataInputBusinessType === 12 ? values[1] : values[1][0],
31703
+ style: styleCommon,
31704
+ treeCheckStrictly: true,
31705
+ onChange: function onChange(value) {
31706
+ if (dataInputBusinessType === 12) {
31707
+ values[1] = value.map(function (i) {
31708
+ return i.key;
31709
+ });
31710
+ valueNames[1] = value.map(function (i) {
31711
+ return i.label || '';
31712
+ });
31713
+ } else {
31714
+ values[1] = [value.key];
31715
+ valueNames[1] = [value.label || ''];
31716
+ }
31717
+ callback(values, valueNames);
31718
+ },
31719
+ requestConfig: {
31720
+ initialParams: {
31721
+ 'orgViewCode': 'administrative-organization-view',
31722
+ 'qp-idPath-like': getCurrentTargetBgId() || ''
31723
+ }
31724
+ },
31725
+ getPopupContainer: function getPopupContainer() {
31726
+ return document.body;
31727
+ }
31728
+ }));
31729
+ } else {
31730
+ return /*#__PURE__*/React$1.createElement(BusinessTreeSearchSelect$1, {
31731
+ disabled: disabled,
31732
+ treeCheckable: dataInputBusinessType === 12,
31733
+ businessType: "department",
31734
+ labelInValue: true,
31735
+ value: dataInputBusinessType === 12 ? values : values[0],
31736
+ style: styleCommon,
31737
+ treeCheckStrictly: true,
31738
+ onChange: function onChange(value) {
31739
+ if (dataInputBusinessType === 12) {
31740
+ values = value.map(function (i) {
31741
+ return i.key;
31742
+ }) || [];
31743
+ valueNames = value.map(function (i) {
31744
+ return i.label || '';
31745
+ }) || [];
31746
+ } else {
31747
+ values = (value === null || value === void 0 ? void 0 : value.key) ? [value.key] : [];
31748
+ valueNames = (value === null || value === void 0 ? void 0 : value.label) ? [value.label] : [];
31749
+ }
31750
+ callback(values, valueNames);
31751
+ },
31752
+ getPopupContainer: function getPopupContainer() {
31753
+ return document.body;
31754
+ }
31755
+ });
31756
+ }
31757
+ }
31663
31758
  // 采购组织选择器
31664
31759
  if (dataChoiceBusinessType == 220) {
31665
31760
  if (INTERVAL_TYPE.indexOf(selectOperation) > -1) {
@@ -34210,6 +34305,25 @@ function RenderCompItem(props) {
34210
34305
  getPopupContainer: function getPopupContainer() {
34211
34306
  return document.body;
34212
34307
  }
34308
+ })) || null, ((ites === null || ites === void 0 ? void 0 : ites.inputType) === 20 || (ites === null || ites === void 0 ? void 0 : ites.inputType) === 30) && (ites === null || ites === void 0 ? void 0 : ites.choiceType) === 211 && ( /*#__PURE__*/React$1.createElement(BusinessTreeSearchSelect$1, {
34309
+ disabled: disabled,
34310
+ treeCheckable: (ites === null || ites === void 0 ? void 0 : ites.inputType) === 30,
34311
+ businessType: "department",
34312
+ labelInValue: true,
34313
+ value: showValue(ites.code),
34314
+ style: styleCommon,
34315
+ onChange: function onChange(value) {
34316
+ handleEdit(ites.code, value);
34317
+ },
34318
+ requestConfig: {
34319
+ initialParams: {
34320
+ 'orgViewCode': 'administrative-organization-view',
34321
+ 'qp-idPath-like': getCurrentTargetBgId() || ''
34322
+ }
34323
+ },
34324
+ getPopupContainer: function getPopupContainer() {
34325
+ return document.body;
34326
+ }
34213
34327
  })) || null, ((ites === null || ites === void 0 ? void 0 : ites.inputType) === 20 || (ites === null || ites === void 0 ? void 0 : ites.inputType) === 30) && (ites === null || ites === void 0 ? void 0 : ites.choiceType) === 220 && ( /*#__PURE__*/React$1.createElement(BusinessTreeSearchSelect$1, {
34214
34328
  disabled: disabled,
34215
34329
  treeCheckable: (ites === null || ites === void 0 ? void 0 : ites.inputType) === 30,
package/dist/index.js CHANGED
@@ -31683,6 +31683,101 @@ var RuleField = /*#__PURE__*/function (_Component) {
31683
31683
  });
31684
31684
  }
31685
31685
  }
31686
+ // 行政组织选择器(按登录组织过滤)
31687
+ if (dataChoiceBusinessType == 211) {
31688
+ if (INTERVAL_TYPE.indexOf(selectOperation) > -1) {
31689
+ return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(BusinessTreeSearchSelect$1, {
31690
+ disabled: disabled,
31691
+ treeCheckable: dataInputBusinessType === 12,
31692
+ businessType: "department",
31693
+ labelInValue: true,
31694
+ value: dataInputBusinessType === 12 ? values[0] : values[0][0],
31695
+ style: styleCommon,
31696
+ treeCheckStrictly: true,
31697
+ onChange: function onChange(value) {
31698
+ if (dataInputBusinessType === 12) {
31699
+ values[0] = value.map(function (i) {
31700
+ return i.key;
31701
+ });
31702
+ valueNames[0] = value.map(function (i) {
31703
+ return i.label || '';
31704
+ });
31705
+ } else {
31706
+ values[0] = [value.key];
31707
+ valueNames[0] = [value.label || ''];
31708
+ }
31709
+ callback(values, valueNames);
31710
+ },
31711
+ requestConfig: {
31712
+ initialParams: {
31713
+ 'orgViewCode': 'administrative-organization-view',
31714
+ 'qp-idPath-like': getCurrentTargetBgId() || ''
31715
+ }
31716
+ },
31717
+ getPopupContainer: function getPopupContainer() {
31718
+ return document.body;
31719
+ }
31720
+ }), /*#__PURE__*/React__default['default'].createElement("span", null, "~"), /*#__PURE__*/React__default['default'].createElement(BusinessTreeSearchSelect$1, {
31721
+ disabled: disabled,
31722
+ treeCheckable: dataInputBusinessType === 12,
31723
+ businessType: "department",
31724
+ labelInValue: true,
31725
+ value: dataInputBusinessType === 12 ? values[1] : values[1][0],
31726
+ style: styleCommon,
31727
+ treeCheckStrictly: true,
31728
+ onChange: function onChange(value) {
31729
+ if (dataInputBusinessType === 12) {
31730
+ values[1] = value.map(function (i) {
31731
+ return i.key;
31732
+ });
31733
+ valueNames[1] = value.map(function (i) {
31734
+ return i.label || '';
31735
+ });
31736
+ } else {
31737
+ values[1] = [value.key];
31738
+ valueNames[1] = [value.label || ''];
31739
+ }
31740
+ callback(values, valueNames);
31741
+ },
31742
+ requestConfig: {
31743
+ initialParams: {
31744
+ 'orgViewCode': 'administrative-organization-view',
31745
+ 'qp-idPath-like': getCurrentTargetBgId() || ''
31746
+ }
31747
+ },
31748
+ getPopupContainer: function getPopupContainer() {
31749
+ return document.body;
31750
+ }
31751
+ }));
31752
+ } else {
31753
+ return /*#__PURE__*/React__default['default'].createElement(BusinessTreeSearchSelect$1, {
31754
+ disabled: disabled,
31755
+ treeCheckable: dataInputBusinessType === 12,
31756
+ businessType: "department",
31757
+ labelInValue: true,
31758
+ value: dataInputBusinessType === 12 ? values : values[0],
31759
+ style: styleCommon,
31760
+ treeCheckStrictly: true,
31761
+ onChange: function onChange(value) {
31762
+ if (dataInputBusinessType === 12) {
31763
+ values = value.map(function (i) {
31764
+ return i.key;
31765
+ }) || [];
31766
+ valueNames = value.map(function (i) {
31767
+ return i.label || '';
31768
+ }) || [];
31769
+ } else {
31770
+ values = (value === null || value === void 0 ? void 0 : value.key) ? [value.key] : [];
31771
+ valueNames = (value === null || value === void 0 ? void 0 : value.label) ? [value.label] : [];
31772
+ }
31773
+ callback(values, valueNames);
31774
+ },
31775
+ getPopupContainer: function getPopupContainer() {
31776
+ return document.body;
31777
+ }
31778
+ });
31779
+ }
31780
+ }
31686
31781
  // 采购组织选择器
31687
31782
  if (dataChoiceBusinessType == 220) {
31688
31783
  if (INTERVAL_TYPE.indexOf(selectOperation) > -1) {
@@ -34233,6 +34328,25 @@ function RenderCompItem(props) {
34233
34328
  getPopupContainer: function getPopupContainer() {
34234
34329
  return document.body;
34235
34330
  }
34331
+ })) || null, ((ites === null || ites === void 0 ? void 0 : ites.inputType) === 20 || (ites === null || ites === void 0 ? void 0 : ites.inputType) === 30) && (ites === null || ites === void 0 ? void 0 : ites.choiceType) === 211 && ( /*#__PURE__*/React__default['default'].createElement(BusinessTreeSearchSelect$1, {
34332
+ disabled: disabled,
34333
+ treeCheckable: (ites === null || ites === void 0 ? void 0 : ites.inputType) === 30,
34334
+ businessType: "department",
34335
+ labelInValue: true,
34336
+ value: showValue(ites.code),
34337
+ style: styleCommon,
34338
+ onChange: function onChange(value) {
34339
+ handleEdit(ites.code, value);
34340
+ },
34341
+ requestConfig: {
34342
+ initialParams: {
34343
+ 'orgViewCode': 'administrative-organization-view',
34344
+ 'qp-idPath-like': getCurrentTargetBgId() || ''
34345
+ }
34346
+ },
34347
+ getPopupContainer: function getPopupContainer() {
34348
+ return document.body;
34349
+ }
34236
34350
  })) || null, ((ites === null || ites === void 0 ? void 0 : ites.inputType) === 20 || (ites === null || ites === void 0 ? void 0 : ites.inputType) === 30) && (ites === null || ites === void 0 ? void 0 : ites.choiceType) === 220 && ( /*#__PURE__*/React__default['default'].createElement(BusinessTreeSearchSelect$1, {
34237
34351
  disabled: disabled,
34238
34352
  treeCheckable: (ites === null || ites === void 0 ? void 0 : ites.inputType) === 30,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bit-sun/business-component",
3
- "version": "3.1.10-alpha.11",
3
+ "version": "3.1.10-alpha.12",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -2,6 +2,7 @@
2
2
  import { BsCascader } from '@/components/Functional/BsAntdSula';
3
3
  import { BusinessSearchSelect, BusinessTreeSearchSelect } from '@/index';
4
4
  import { getDictionarySource, judgeIsEmpty, uuid } from '../../../utils/utils';
5
+ import { getCurrentTargetBgId } from '../../../utils/LocalstorageUtils';
5
6
  import { useRequest } from 'ahooks';
6
7
  import { Input, InputNumber, DatePicker, Switch, Select } from 'antd';
7
8
  import React, { useEffect, useState } from 'react'
@@ -406,6 +407,29 @@ export default function RenderCompItem(props:any){
406
407
  />
407
408
  )) ||
408
409
  null}
410
+ {/* 单选/多选 行政组织选择器(按登录组织过滤) */}
411
+ {((ites?.inputType === 20 || ites?.inputType === 30) &&
412
+ ites?.choiceType === 211 && (
413
+ <BusinessTreeSearchSelect
414
+ disabled={disabled}
415
+ treeCheckable={ites?.inputType === 30}
416
+ businessType="department"
417
+ labelInValue={true}
418
+ value={showValue(ites.code)}
419
+ style={styleCommon}
420
+ onChange={(value) => {
421
+ handleEdit(ites.code, value);
422
+ }}
423
+ requestConfig={{
424
+ initialParams:{
425
+ 'orgViewCode': 'administrative-organization-view',
426
+ 'qp-idPath-like': getCurrentTargetBgId() || '',
427
+ }
428
+ }}
429
+ getPopupContainer={() => document.body}
430
+ />
431
+ )) ||
432
+ null}
409
433
  {/* 单选/多选 采购组织选择器 */}
410
434
  {((ites?.inputType === 20 || ites?.inputType === 30) &&
411
435
  ites?.choiceType === 220 && (
@@ -4,6 +4,7 @@ import styles from './index.less';
4
4
  import { getRegularThresholdRange } from './services';
5
5
  import moment from 'moment';
6
6
  import { judgeIsEmpty } from '../../../utils/utils';
7
+ import { getCurrentTargetBgId } from '../../../utils/LocalstorageUtils';
7
8
  import { handleError } from '../../../utils/requestUtils';
8
9
  import { queryIdentityInfo, findChangedThresholdQuery, setParams, dateFormat, fullDateFormat } from './util';
9
10
  import { request as SulaRequest } from 'bssula';
@@ -1218,6 +1219,91 @@ export default class RuleField extends Component {
1218
1219
  );
1219
1220
  }
1220
1221
  }
1222
+ // 行政组织选择器(按登录组织过滤)
1223
+ if (dataChoiceBusinessType == 211) {
1224
+ if (INTERVAL_TYPE.indexOf(selectOperation) > -1) {
1225
+ return (
1226
+ <>
1227
+ <BusinessTreeSearchSelect
1228
+ disabled={disabled}
1229
+ treeCheckable={dataInputBusinessType === 12}
1230
+ businessType="department"
1231
+ labelInValue={true}
1232
+ value={dataInputBusinessType === 12 ? values[0] : values[0][0]}
1233
+ style={styleCommon}
1234
+ treeCheckStrictly={true}
1235
+ onChange={(value) => {
1236
+ if (dataInputBusinessType === 12) {
1237
+ values[0] = value.map((i) => i.key);
1238
+ valueNames[0] = value.map((i) => i.label || '');
1239
+ } else {
1240
+ values[0] = [value.key];
1241
+ valueNames[0] = [value.label || ''];
1242
+ }
1243
+ callback(values, valueNames);
1244
+ }}
1245
+ requestConfig={{
1246
+ initialParams:{
1247
+ 'orgViewCode': 'administrative-organization-view',
1248
+ 'qp-idPath-like': getCurrentTargetBgId() || '',
1249
+ }
1250
+ }}
1251
+ getPopupContainer={() => document.body}
1252
+ />
1253
+ <span>~</span>
1254
+ <BusinessTreeSearchSelect
1255
+ disabled={disabled}
1256
+ treeCheckable={dataInputBusinessType === 12}
1257
+ businessType="department"
1258
+ labelInValue={true}
1259
+ value={dataInputBusinessType === 12 ? values[1] : values[1][0]}
1260
+ style={styleCommon}
1261
+ treeCheckStrictly={true}
1262
+ onChange={(value) => {
1263
+ if (dataInputBusinessType === 12) {
1264
+ values[1] = value.map((i) => i.key);
1265
+ valueNames[1] = value.map((i) => i.label || '');
1266
+ } else {
1267
+ values[1] = [value.key];
1268
+ valueNames[1] = [value.label || ''];
1269
+ }
1270
+ callback(values, valueNames);
1271
+ }}
1272
+ requestConfig={{
1273
+ initialParams:{
1274
+ 'orgViewCode': 'administrative-organization-view',
1275
+ 'qp-idPath-like': getCurrentTargetBgId() || '',
1276
+ }
1277
+ }}
1278
+ getPopupContainer={() => document.body}
1279
+ />
1280
+ </>
1281
+ );
1282
+ } else {
1283
+ return (
1284
+ <BusinessTreeSearchSelect
1285
+ disabled={disabled}
1286
+ treeCheckable={dataInputBusinessType === 12}
1287
+ businessType="department"
1288
+ labelInValue={true}
1289
+ value={dataInputBusinessType === 12 ? values : values[0]}
1290
+ style={styleCommon}
1291
+ treeCheckStrictly={true}
1292
+ onChange={(value) => {
1293
+ if (dataInputBusinessType === 12) {
1294
+ values = value.map((i) => i.key)||[];
1295
+ valueNames = value.map((i) => i.label || '')||[];
1296
+ } else {
1297
+ values = value?.key?[value.key]:[];
1298
+ valueNames = value?.label?[value.label]:[];
1299
+ }
1300
+ callback(values, valueNames);
1301
+ }}
1302
+ getPopupContainer={() => document.body}
1303
+ />
1304
+ );
1305
+ }
1306
+ }
1221
1307
  // 采购组织选择器
1222
1308
  if (dataChoiceBusinessType == 220) {
1223
1309
  if (INTERVAL_TYPE.indexOf(selectOperation) > -1) {