kts-components-document-access-point 1.2.1 → 1.2.6
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/DocumentWhiteList/control/actions/synclist/index.d.ts +1 -1
- package/dist/DocumentsList/DocumentsListController/DocumentsListControllerState/index.d.ts +1 -1
- package/dist/index.esm.js +137 -39
- package/dist/index.js +137 -39
- package/package.json +1 -1
- package/src/DocumentWhiteList/control/actions/synclist/index.ts +1 -1
- package/src/DocumentWhiteList/ui/clientmodal/index.tsx +13 -6
- package/src/DocumentWhiteList/ui/main/black.tsx +1 -1
- package/src/DocumentWhiteList/ui/main/white.tsx +1 -1
- package/src/DocumentWhiteList/ui/pageheader/BlackHeader.tsx +1 -1
- package/src/DocumentWhiteList/ui/pageheader/WhiteHeader.tsx +1 -1
- package/src/DocumentsCont/___demo___/base/index.tsx +1 -1
- package/src/DocumentsEdit/ui/PropertyTable/hooks/useTableProps/ui/AddChildPropertyButton/index.tsx +1 -1
- package/src/DocumentsEdit/ui/PropertyTable/hooks/useTableProps/ui/AddRuleButton/index.tsx +21 -11
- package/src/DocumentsList/DocumentsListController/DocumentsListControllerState/index.ts +1 -1
- package/src/DocumentsList/index.tsx +9 -1
- package/src/DocumentsList/ui/ModalComfirm/index.tsx +11 -5
- package/src/DocumentsList/ui/PageHeader/SendHeader.tsx +1 -1
- package/src/DocumentsList/ui/PageHeader/index.tsx +6 -6
- package/src/DocumentsList/ui/sendlist/index.tsx +5 -5
- package/src/DocumentsRule/ui/main/index.tsx +23 -9
- package/docs-dist/umi.js +0 -1
package/dist/index.js
CHANGED
|
@@ -1309,7 +1309,7 @@ var AddChildPropertyButton = (function (props) {
|
|
|
1309
1309
|
return visible ? /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Button, {
|
|
1310
1310
|
onClick: onClick,
|
|
1311
1311
|
type: "link"
|
|
1312
|
-
}, readOnly ? '
|
|
1312
|
+
}, readOnly ? '查看子字段' : '添加子字段') : /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
|
|
1313
1313
|
});
|
|
1314
1314
|
|
|
1315
1315
|
var EditPropertyButton = (function (props) {
|
|
@@ -1362,11 +1362,18 @@ var AddRuleButton = (function (props) {
|
|
|
1362
1362
|
var readOnly = controller.useMemo(function (s) {
|
|
1363
1363
|
return s.readOnly;
|
|
1364
1364
|
}, []);
|
|
1365
|
+
/** 是否可以显示 */
|
|
1366
|
+
|
|
1365
1367
|
var visible = React__default['default'].useMemo(function () {
|
|
1366
1368
|
return algorithm.filter(function (e) {
|
|
1367
1369
|
return e.type === getPropertiesType(properties);
|
|
1368
1370
|
}).length > 0;
|
|
1369
1371
|
}, [properties, algorithm]);
|
|
1372
|
+
/** 是否有规则 */
|
|
1373
|
+
|
|
1374
|
+
var isHivRules = React__default['default'].useMemo(function () {
|
|
1375
|
+
return !!(properties.ref.rules && properties.ref.rules.length > 0);
|
|
1376
|
+
}, [properties]);
|
|
1370
1377
|
var onClick = React__default['default'].useCallback(function () {
|
|
1371
1378
|
controller.pipeline( /*#__PURE__*/function () {
|
|
1372
1379
|
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(s) {
|
|
@@ -1388,16 +1395,27 @@ var AddRuleButton = (function (props) {
|
|
|
1388
1395
|
return _ref.apply(this, arguments);
|
|
1389
1396
|
};
|
|
1390
1397
|
}())();
|
|
1391
|
-
}, [properties, controller]);
|
|
1392
|
-
return visible ? /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Button, {
|
|
1393
|
-
onClick: onClick,
|
|
1394
|
-
type: "link"
|
|
1395
|
-
}, function () {
|
|
1396
|
-
var _properties$ref$rules, _properties$ref$rules2;
|
|
1398
|
+
}, [properties, controller]); // 查看规则
|
|
1397
1399
|
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1400
|
+
if (readOnly) {
|
|
1401
|
+
if (isHivRules) {
|
|
1402
|
+
return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Button, {
|
|
1403
|
+
onClick: onClick,
|
|
1404
|
+
type: "link"
|
|
1405
|
+
}, "\u67E5\u770B\u89C4\u5219");
|
|
1406
|
+
} else {
|
|
1407
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
|
|
1408
|
+
}
|
|
1409
|
+
} else {
|
|
1410
|
+
if (visible) {
|
|
1411
|
+
return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Button, {
|
|
1412
|
+
onClick: onClick,
|
|
1413
|
+
type: "link"
|
|
1414
|
+
}, isHivRules ? "编辑验证规则" : "添加验证规则");
|
|
1415
|
+
} else {
|
|
1416
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
|
|
1417
|
+
}
|
|
1418
|
+
}
|
|
1401
1419
|
});
|
|
1402
1420
|
|
|
1403
1421
|
function getPropertiesType(ruleProperties) {
|
|
@@ -2810,9 +2828,9 @@ function modalcomfirm(props) {
|
|
|
2810
2828
|
}, []);
|
|
2811
2829
|
var radioStyle = React.useMemo(function () {
|
|
2812
2830
|
return {
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
lineHeight:
|
|
2831
|
+
alignItems: 'center',
|
|
2832
|
+
marginBottom: 10,
|
|
2833
|
+
lineHeight: 1.2
|
|
2816
2834
|
};
|
|
2817
2835
|
}, []);
|
|
2818
2836
|
return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(ktsXui.Modal, {
|
|
@@ -2828,7 +2846,22 @@ function modalcomfirm(props) {
|
|
|
2828
2846
|
style: radioStyle,
|
|
2829
2847
|
key: key,
|
|
2830
2848
|
value: item.participantId
|
|
2831
|
-
},
|
|
2849
|
+
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Tooltip, {
|
|
2850
|
+
title: item.participantId
|
|
2851
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
2852
|
+
style: {
|
|
2853
|
+
display: 'flex',
|
|
2854
|
+
flexDirection: 'column',
|
|
2855
|
+
alignContent: 'flex-start'
|
|
2856
|
+
}
|
|
2857
|
+
}, /*#__PURE__*/React__default['default'].createElement("span", null, item.remarkName, "2"), /*#__PURE__*/React__default['default'].createElement("span", {
|
|
2858
|
+
style: {
|
|
2859
|
+
maxWidth: 460,
|
|
2860
|
+
overflow: 'hidden',
|
|
2861
|
+
textOverflow: 'ellipsis',
|
|
2862
|
+
display: 'block'
|
|
2863
|
+
}
|
|
2864
|
+
}, item.participantId))));
|
|
2832
2865
|
}))));
|
|
2833
2866
|
}
|
|
2834
2867
|
|
|
@@ -3064,13 +3097,13 @@ var PageHeader = (function () {
|
|
|
3064
3097
|
title: "配置名称"
|
|
3065
3098
|
},
|
|
3066
3099
|
effectStatus: {
|
|
3067
|
-
type: "
|
|
3068
|
-
title: "
|
|
3100
|
+
type: "radio",
|
|
3101
|
+
title: "使用标识",
|
|
3069
3102
|
enum: [{
|
|
3070
|
-
"label": "
|
|
3103
|
+
"label": "已失效",
|
|
3071
3104
|
"value": 0
|
|
3072
3105
|
}, {
|
|
3073
|
-
"label": "
|
|
3106
|
+
"label": "使用中",
|
|
3074
3107
|
"value": 1
|
|
3075
3108
|
}]
|
|
3076
3109
|
},
|
|
@@ -3103,7 +3136,7 @@ var PageHeader = (function () {
|
|
|
3103
3136
|
visible: false
|
|
3104
3137
|
},
|
|
3105
3138
|
attribution: {
|
|
3106
|
-
type: "
|
|
3139
|
+
type: "radio",
|
|
3107
3140
|
title: "我的收发角色",
|
|
3108
3141
|
enum: [{
|
|
3109
3142
|
"label": "发送方",
|
|
@@ -3242,7 +3275,7 @@ var PageHeader = (function () {
|
|
|
3242
3275
|
style: {
|
|
3243
3276
|
marginRight: 10
|
|
3244
3277
|
}
|
|
3245
|
-
}, "\
|
|
3278
|
+
}, "\u53D1\u5E03"), /*#__PURE__*/React__default['default'].createElement(ktsXui.Dropdown, {
|
|
3246
3279
|
key: "2",
|
|
3247
3280
|
overlay: menu
|
|
3248
3281
|
}, /*#__PURE__*/React__default['default'].createElement(ktsXui.Button, {
|
|
@@ -3848,7 +3881,11 @@ function validaterule$1(props) {
|
|
|
3848
3881
|
}
|
|
3849
3882
|
|
|
3850
3883
|
if (text === 1) {
|
|
3851
|
-
return /*#__PURE__*/React__default['default'].createElement("span",
|
|
3884
|
+
return /*#__PURE__*/React__default['default'].createElement("span", {
|
|
3885
|
+
style: {
|
|
3886
|
+
color: '#0074ff'
|
|
3887
|
+
}
|
|
3888
|
+
}, "\u4F7F\u7528\u4E2D");
|
|
3852
3889
|
}
|
|
3853
3890
|
}
|
|
3854
3891
|
}, {
|
|
@@ -3991,6 +4028,32 @@ var Main$1 = function Main(props) {
|
|
|
3991
4028
|
var type = controller.useMemo(function (s) {
|
|
3992
4029
|
return s.type;
|
|
3993
4030
|
}, []);
|
|
4031
|
+
React.useEffect(function () {
|
|
4032
|
+
var params = props.location.query && props.location.query.type;
|
|
4033
|
+
|
|
4034
|
+
if (params) {
|
|
4035
|
+
controller.pipeline( /*#__PURE__*/function () {
|
|
4036
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(s) {
|
|
4037
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
4038
|
+
while (1) {
|
|
4039
|
+
switch (_context.prev = _context.next) {
|
|
4040
|
+
case 0:
|
|
4041
|
+
s.type = Number(params);
|
|
4042
|
+
|
|
4043
|
+
case 1:
|
|
4044
|
+
case "end":
|
|
4045
|
+
return _context.stop();
|
|
4046
|
+
}
|
|
4047
|
+
}
|
|
4048
|
+
}, _callee);
|
|
4049
|
+
}));
|
|
4050
|
+
|
|
4051
|
+
return function (_x) {
|
|
4052
|
+
return _ref.apply(this, arguments);
|
|
4053
|
+
};
|
|
4054
|
+
}())();
|
|
4055
|
+
}
|
|
4056
|
+
}, [type]);
|
|
3994
4057
|
return /*#__PURE__*/React__default['default'].createElement(DocumentsListContext.Provider, {
|
|
3995
4058
|
value: controller
|
|
3996
4059
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
@@ -4892,9 +4955,9 @@ function Rule(props) {
|
|
|
4892
4955
|
}, []);
|
|
4893
4956
|
var radioStyle = React.useMemo(function () {
|
|
4894
4957
|
return {
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
lineHeight:
|
|
4958
|
+
alignItems: 'center',
|
|
4959
|
+
marginBottom: 10,
|
|
4960
|
+
lineHeight: 1.2
|
|
4898
4961
|
};
|
|
4899
4962
|
}, []);
|
|
4900
4963
|
var updateSchema = React.useCallback(function (e) {
|
|
@@ -4907,13 +4970,23 @@ function Rule(props) {
|
|
|
4907
4970
|
confirm({
|
|
4908
4971
|
title: '您当前有内容未保存,是否退出?',
|
|
4909
4972
|
onOk: function onOk() {
|
|
4910
|
-
|
|
4973
|
+
goBack();
|
|
4911
4974
|
}
|
|
4912
4975
|
});
|
|
4913
4976
|
} else {
|
|
4914
|
-
|
|
4977
|
+
goBack();
|
|
4915
4978
|
}
|
|
4916
4979
|
}, [hasChange]);
|
|
4980
|
+
var goBack = React.useCallback(function () {
|
|
4981
|
+
if (type === 'record') {
|
|
4982
|
+
history.push({
|
|
4983
|
+
pathname: "/rulelist",
|
|
4984
|
+
search: "?type=2"
|
|
4985
|
+
});
|
|
4986
|
+
} else {
|
|
4987
|
+
history.goBack();
|
|
4988
|
+
}
|
|
4989
|
+
}, []);
|
|
4917
4990
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
4918
4991
|
style: {
|
|
4919
4992
|
height: '100%',
|
|
@@ -5067,7 +5140,22 @@ function Rule(props) {
|
|
|
5067
5140
|
style: radioStyle,
|
|
5068
5141
|
key: key,
|
|
5069
5142
|
value: item.participantId
|
|
5070
|
-
},
|
|
5143
|
+
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Tooltip, {
|
|
5144
|
+
title: item.participantId
|
|
5145
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
5146
|
+
style: {
|
|
5147
|
+
display: 'flex',
|
|
5148
|
+
flexDirection: 'column',
|
|
5149
|
+
alignContent: 'flex-start'
|
|
5150
|
+
}
|
|
5151
|
+
}, /*#__PURE__*/React__default['default'].createElement("span", null, item.remarkName), /*#__PURE__*/React__default['default'].createElement("span", {
|
|
5152
|
+
style: {
|
|
5153
|
+
maxWidth: 460,
|
|
5154
|
+
overflow: 'hidden',
|
|
5155
|
+
textOverflow: 'ellipsis',
|
|
5156
|
+
display: 'block'
|
|
5157
|
+
}
|
|
5158
|
+
}, item.participantId))));
|
|
5071
5159
|
}))));
|
|
5072
5160
|
}
|
|
5073
5161
|
|
|
@@ -5851,7 +5939,7 @@ var Header = (function () {
|
|
|
5851
5939
|
},
|
|
5852
5940
|
dataStatus: {
|
|
5853
5941
|
type: "string",
|
|
5854
|
-
title: "
|
|
5942
|
+
title: "数据状态",
|
|
5855
5943
|
enum: [{
|
|
5856
5944
|
"label": "使用中",
|
|
5857
5945
|
"value": 1
|
|
@@ -6050,7 +6138,7 @@ function Rule$1(props) {
|
|
|
6050
6138
|
title: '所属公司',
|
|
6051
6139
|
dataIndex: 'customerName'
|
|
6052
6140
|
}, {
|
|
6053
|
-
title: '
|
|
6141
|
+
title: '数据状态',
|
|
6054
6142
|
dataIndex: 'dataStatus',
|
|
6055
6143
|
render: function render(text) {
|
|
6056
6144
|
return dataStatusEnum[text];
|
|
@@ -6286,7 +6374,7 @@ var Header$1 = (function () {
|
|
|
6286
6374
|
},
|
|
6287
6375
|
dataStatus: {
|
|
6288
6376
|
type: "string",
|
|
6289
|
-
title: "
|
|
6377
|
+
title: "数据状态",
|
|
6290
6378
|
enum: [{
|
|
6291
6379
|
"label": "使用中",
|
|
6292
6380
|
"value": 1
|
|
@@ -6482,7 +6570,7 @@ function Rule$2(props) {
|
|
|
6482
6570
|
title: '所属公司',
|
|
6483
6571
|
dataIndex: 'customerName'
|
|
6484
6572
|
}, {
|
|
6485
|
-
title: '
|
|
6573
|
+
title: '数据状态',
|
|
6486
6574
|
dataIndex: 'dataStatus',
|
|
6487
6575
|
render: function render(text) {
|
|
6488
6576
|
return dataStatusEnum[text];
|
|
@@ -7145,6 +7233,13 @@ function modalcomfirm$2(props) {
|
|
|
7145
7233
|
params = _useState2[0],
|
|
7146
7234
|
setParams = _useState2[1];
|
|
7147
7235
|
|
|
7236
|
+
var whiteParams = controller.useMemo(function (s) {
|
|
7237
|
+
return s.whiteParams;
|
|
7238
|
+
}, []);
|
|
7239
|
+
var blackParams = controller.useMemo(function (s) {
|
|
7240
|
+
return s.params;
|
|
7241
|
+
}, []);
|
|
7242
|
+
|
|
7148
7243
|
var _useState3 = React.useState({
|
|
7149
7244
|
pageNum: 1,
|
|
7150
7245
|
pageSize: 10
|
|
@@ -7184,7 +7279,7 @@ function modalcomfirm$2(props) {
|
|
|
7184
7279
|
case 0:
|
|
7185
7280
|
_context.next = 2;
|
|
7186
7281
|
return controller.synclist(_objectSpread2(_objectSpread2({}, params), {}, {
|
|
7187
|
-
|
|
7282
|
+
type: listNature
|
|
7188
7283
|
}, pageMeta));
|
|
7189
7284
|
|
|
7190
7285
|
case 2:
|
|
@@ -7302,7 +7397,8 @@ function modalcomfirm$2(props) {
|
|
|
7302
7397
|
}, []);
|
|
7303
7398
|
var onSubmit = React.useCallback(function () {
|
|
7304
7399
|
_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
|
|
7305
|
-
var res, data;
|
|
7400
|
+
var res, data, _data;
|
|
7401
|
+
|
|
7306
7402
|
return regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
7307
7403
|
while (1) {
|
|
7308
7404
|
switch (_context3.prev = _context3.next) {
|
|
@@ -7314,14 +7410,16 @@ function modalcomfirm$2(props) {
|
|
|
7314
7410
|
res = _context3.sent;
|
|
7315
7411
|
|
|
7316
7412
|
if (res.res) {
|
|
7317
|
-
data = _objectSpread2(_objectSpread2({}, params), {}, {
|
|
7318
|
-
type: listNature
|
|
7319
|
-
});
|
|
7320
|
-
|
|
7321
7413
|
if (listNature === '1') {
|
|
7414
|
+
data = _objectSpread2(_objectSpread2({}, whiteParams), {}, {
|
|
7415
|
+
type: listNature
|
|
7416
|
+
});
|
|
7322
7417
|
controller.getWhitelist(data);
|
|
7323
7418
|
} else {
|
|
7324
|
-
|
|
7419
|
+
_data = _objectSpread2(_objectSpread2({}, blackParams), {}, {
|
|
7420
|
+
type: listNature
|
|
7421
|
+
});
|
|
7422
|
+
controller.getBlacklist(_data);
|
|
7325
7423
|
}
|
|
7326
7424
|
}
|
|
7327
7425
|
|
|
@@ -7346,7 +7444,7 @@ function modalcomfirm$2(props) {
|
|
|
7346
7444
|
marginBottom: 24
|
|
7347
7445
|
}
|
|
7348
7446
|
}, /*#__PURE__*/React__default['default'].createElement(ktsComponents.AdvancedSearch, {
|
|
7349
|
-
width:
|
|
7447
|
+
width: 480,
|
|
7350
7448
|
height: 44,
|
|
7351
7449
|
compact: true,
|
|
7352
7450
|
defaultKey: "customerDid",
|
package/package.json
CHANGED
|
@@ -9,6 +9,8 @@ export default function modalcomfirm(props: any) {
|
|
|
9
9
|
const controller = Main.useController();
|
|
10
10
|
const clientInfo = controller.useMemo(s => s.clientInfo, [])
|
|
11
11
|
const [params, setParams] = useState({});
|
|
12
|
+
const whiteParams = controller.useMemo(s => s.whiteParams, [])
|
|
13
|
+
const blackParams = controller.useMemo(s => s.params, [])
|
|
12
14
|
const [pageMeta, setPage] = useState({ pageNum: 1, pageSize: 10 });
|
|
13
15
|
const [selectedRowKeys, setKey] = useState([]);
|
|
14
16
|
const [list, setList] = useState([]);
|
|
@@ -17,7 +19,7 @@ export default function modalcomfirm(props: any) {
|
|
|
17
19
|
const [companyDidNote, setNote] = useState('');
|
|
18
20
|
useEffect(() => {
|
|
19
21
|
(async () => {
|
|
20
|
-
const res = await controller.synclist({ ...params, listNature, ...pageMeta })
|
|
22
|
+
const res = await controller.synclist({ ...params, type:listNature, ...pageMeta })
|
|
21
23
|
if (res.res) {
|
|
22
24
|
setList(res.res.items);
|
|
23
25
|
}
|
|
@@ -107,13 +109,18 @@ export default function modalcomfirm(props: any) {
|
|
|
107
109
|
(async () => {
|
|
108
110
|
const res = await controller.addWhite(selectedRowKeys) as any;
|
|
109
111
|
if (res.res) {
|
|
110
|
-
|
|
111
|
-
...params,
|
|
112
|
-
type: listNature
|
|
113
|
-
}
|
|
112
|
+
|
|
114
113
|
if (listNature === '1') {
|
|
114
|
+
const data = {
|
|
115
|
+
...whiteParams,
|
|
116
|
+
type: listNature
|
|
117
|
+
}
|
|
115
118
|
controller.getWhitelist(data);
|
|
116
119
|
} else {
|
|
120
|
+
const data = {
|
|
121
|
+
...blackParams,
|
|
122
|
+
type: listNature
|
|
123
|
+
}
|
|
117
124
|
controller.getBlacklist(data);
|
|
118
125
|
}
|
|
119
126
|
}
|
|
@@ -131,7 +138,7 @@ export default function modalcomfirm(props: any) {
|
|
|
131
138
|
>
|
|
132
139
|
<div style={{ marginBottom: 24 }}>
|
|
133
140
|
<AdvancedSearch
|
|
134
|
-
width={
|
|
141
|
+
width={480}
|
|
135
142
|
height={44}
|
|
136
143
|
compact={true}
|
|
137
144
|
defaultKey="customerDid"
|
package/src/DocumentsEdit/ui/PropertyTable/hooks/useTableProps/ui/AddChildPropertyButton/index.tsx
CHANGED
|
@@ -28,7 +28,7 @@ export default (props: { properties: IDataSource }) => {
|
|
|
28
28
|
return (
|
|
29
29
|
visible
|
|
30
30
|
? (
|
|
31
|
-
<Button onClick={onClick} type="link" >{readOnly ? '
|
|
31
|
+
<Button onClick={onClick} type="link" >{readOnly ? '查看子字段' : '添加子字段'}</Button>
|
|
32
32
|
)
|
|
33
33
|
: <></>
|
|
34
34
|
)
|
|
@@ -16,30 +16,40 @@ export default (props: { properties: IDataSource }) => {
|
|
|
16
16
|
/** 只读模式 */
|
|
17
17
|
const readOnly = controller.useMemo(s => s.readOnly, []);
|
|
18
18
|
|
|
19
|
+
/** 是否可以显示 */
|
|
19
20
|
const visible = React.useMemo(() => {
|
|
20
21
|
return algorithm.filter(e => {
|
|
21
22
|
return e.type === getPropertiesType(properties);
|
|
22
23
|
}).length > 0
|
|
23
24
|
}, [properties, algorithm])
|
|
24
25
|
|
|
26
|
+
/** 是否有规则 */
|
|
27
|
+
const isHivRules = React.useMemo(() => {
|
|
28
|
+
return !!(properties.ref.rules && properties.ref.rules.length > 0)
|
|
29
|
+
}, [properties])
|
|
30
|
+
|
|
25
31
|
const onClick = React.useCallback(() => {
|
|
26
32
|
controller.pipeline(async s => { s.ruleState.ruleProperties = JSON.parse(JSON.stringify(properties)) })()
|
|
27
33
|
}, [properties, controller])
|
|
28
34
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
35
|
+
// 查看规则
|
|
36
|
+
if (readOnly) {
|
|
37
|
+
if (isHivRules) {
|
|
38
|
+
return <Button onClick={onClick} type="link" >查看规则</Button>
|
|
39
|
+
} else {
|
|
40
|
+
return <></>
|
|
41
|
+
}
|
|
42
|
+
} else {
|
|
43
|
+
if (visible) {
|
|
44
|
+
return (
|
|
32
45
|
<Button onClick={onClick} type="link" >
|
|
33
|
-
{
|
|
34
|
-
if (readOnly) return '查看规则';
|
|
35
|
-
return properties.ref.rules?.length ?? 0 > 0
|
|
36
|
-
? "编辑验证规则"
|
|
37
|
-
: "添加验证规则"
|
|
38
|
-
})()}
|
|
46
|
+
{isHivRules ? "编辑验证规则" : "添加验证规则"}
|
|
39
47
|
</Button>
|
|
40
48
|
)
|
|
41
|
-
|
|
42
|
-
|
|
49
|
+
} else {
|
|
50
|
+
return <></>
|
|
51
|
+
}
|
|
52
|
+
}
|
|
43
53
|
}
|
|
44
54
|
|
|
45
55
|
function getPropertiesType(ruleProperties?: IDataSource) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { createContext } from 'react';
|
|
1
|
+
import React, { createContext, useEffect } from 'react';
|
|
2
2
|
// import PageHeader from './ui/PageHeader'
|
|
3
3
|
import RuleTable from './ui/RuleTable'
|
|
4
4
|
import DocumentsListController from './DocumentsListController';
|
|
@@ -20,6 +20,14 @@ const Main = (props: any) => {
|
|
|
20
20
|
|
|
21
21
|
const controller = React.useMemo(() => new DocumentsListController(), []);
|
|
22
22
|
const type = controller.useMemo(s => s.type, []);
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
const params = props.location.query && props.location.query.type;
|
|
25
|
+
if (params) {
|
|
26
|
+
controller.pipeline(async s => {
|
|
27
|
+
s.type = Number(params);
|
|
28
|
+
})()
|
|
29
|
+
}
|
|
30
|
+
}, [type]);
|
|
23
31
|
return (
|
|
24
32
|
<DocumentsListContext.Provider value={controller}>
|
|
25
33
|
<div style={{ height: '100%', display: 'flex', flexDirection: 'column' }}>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useCallback, useState, useEffect, useMemo } from 'react';
|
|
2
|
-
import { Radio, message } from 'kts-components-antd-x4';
|
|
2
|
+
import { Radio, message, Tooltip } from 'kts-components-antd-x4';
|
|
3
3
|
import { Modal } from 'kts-xui';
|
|
4
4
|
import Main from '../../';
|
|
5
5
|
import { DocumentsService } from "../../../";
|
|
@@ -43,9 +43,9 @@ export default function modalcomfirm(props: any) {
|
|
|
43
43
|
}, []);
|
|
44
44
|
const radioStyle = useMemo(() => {
|
|
45
45
|
return {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
lineHeight:
|
|
46
|
+
alignItems:'center',
|
|
47
|
+
marginBottom:10,
|
|
48
|
+
lineHeight:1.2
|
|
49
49
|
};
|
|
50
50
|
}, [])
|
|
51
51
|
return (
|
|
@@ -59,7 +59,13 @@ export default function modalcomfirm(props: any) {
|
|
|
59
59
|
<Radio.Group onChange={targetSelect} value={targetId} >
|
|
60
60
|
{
|
|
61
61
|
targetList.map((item: any, key) => {
|
|
62
|
-
return <Radio style={radioStyle} key={key} value={item.participantId} >
|
|
62
|
+
return <Radio style={radioStyle as any} key={key} value={item.participantId} >
|
|
63
|
+
<Tooltip title={item.participantId}>
|
|
64
|
+
<div style={{ display: 'flex', flexDirection:'column',alignContent:'flex-start'}}>
|
|
65
|
+
<span>{item.remarkName}2</span>
|
|
66
|
+
<span style={{ maxWidth: 460, overflow: 'hidden', textOverflow: 'ellipsis', display: 'block' }}>{item.participantId}</span>
|
|
67
|
+
</div>
|
|
68
|
+
</Tooltip></Radio>
|
|
63
69
|
})
|
|
64
70
|
}
|
|
65
71
|
</Radio.Group>
|
|
@@ -122,13 +122,13 @@ export default () => {
|
|
|
122
122
|
title: "配置名称",
|
|
123
123
|
},
|
|
124
124
|
effectStatus: {
|
|
125
|
-
type: "
|
|
126
|
-
title: "
|
|
125
|
+
type: "radio",
|
|
126
|
+
title: "使用标识",
|
|
127
127
|
enum: [{
|
|
128
|
-
"label": "
|
|
128
|
+
"label": "已失效",
|
|
129
129
|
"value": 0
|
|
130
130
|
}, {
|
|
131
|
-
"label": "
|
|
131
|
+
"label": "使用中",
|
|
132
132
|
"value": 1
|
|
133
133
|
}]
|
|
134
134
|
},
|
|
@@ -161,7 +161,7 @@ export default () => {
|
|
|
161
161
|
visible: false
|
|
162
162
|
},
|
|
163
163
|
attribution: {
|
|
164
|
-
type: "
|
|
164
|
+
type: "radio",
|
|
165
165
|
title: "我的收发角色",
|
|
166
166
|
enum: [{
|
|
167
167
|
"label": "发送方",
|
|
@@ -294,7 +294,7 @@ export default () => {
|
|
|
294
294
|
<PageHeaderFoot
|
|
295
295
|
expandLeft={topExpand()}
|
|
296
296
|
expandRight={[
|
|
297
|
-
type === 1 && <Button key="1" onClick={batchSend} style={{ marginRight: 10 }}
|
|
297
|
+
type === 1 && <Button key="1" onClick={batchSend} style={{ marginRight: 10 }}>发布</Button>,
|
|
298
298
|
<Dropdown key="2" overlay={menu}>
|
|
299
299
|
<Button type="primary" >创建配置</Button>
|
|
300
300
|
</Dropdown>
|
|
@@ -66,7 +66,7 @@ export default function validaterule(props: any) {
|
|
|
66
66
|
return <span>已失效</span>
|
|
67
67
|
}
|
|
68
68
|
if (text === 1) {
|
|
69
|
-
return <span>使用中</span>
|
|
69
|
+
return <span style={{ color: '#0074ff' }}>使用中</span>
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
},
|
|
@@ -97,18 +97,18 @@ export default function validaterule(props: any) {
|
|
|
97
97
|
title: '我司对应DID',
|
|
98
98
|
dataIndex: 'senderParticipantId',
|
|
99
99
|
render: (text: any, record: any) => {
|
|
100
|
-
if(record.senderParticipantNote){
|
|
100
|
+
if (record.senderParticipantNote) {
|
|
101
101
|
return <span>{record.senderParticipantNote}:{text}</span>
|
|
102
|
-
}else{
|
|
102
|
+
} else {
|
|
103
103
|
return <span>{text}</span>
|
|
104
104
|
}
|
|
105
|
-
|
|
105
|
+
|
|
106
106
|
}
|
|
107
107
|
},
|
|
108
108
|
{
|
|
109
109
|
title: '接受对象',
|
|
110
110
|
dataIndex: 'receiverParticipantId',
|
|
111
|
-
|
|
111
|
+
|
|
112
112
|
},
|
|
113
113
|
{
|
|
114
114
|
title: '接受对象所属公司',
|