fmui-base 2.2.39 → 2.2.41

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/README.md CHANGED
@@ -3,6 +3,8 @@
3
3
  ---npm publish
4
4
 
5
5
  ## 更新日志
6
+ - 2.2.41: 上海CA提交前开启免密校验
7
+ - 2.2.40: 流程结束环节提交需要弹窗进行确认
6
8
  - 2.2.39: 转交批示意见不必填
7
9
  - 2.2.38: 选人组件扩展页签
8
10
  - 2.2.37: 北京ca加签验签修改
@@ -2297,6 +2297,8 @@ var PageHome = function (_React$Component) {
2297
2297
  }, {
2298
2298
  key: 'handleSubmitFunc',
2299
2299
  value: function handleSubmitFunc(operate) {
2300
+ var _this2 = this;
2301
+
2300
2302
  console.log("handleSubmitFunc operate==" + operate);
2301
2303
  var t = this;
2302
2304
  var auditorUserIds = null;
@@ -2378,498 +2380,531 @@ var PageHome = function (_React$Component) {
2378
2380
  });
2379
2381
  } else if (operate == 1) {
2380
2382
  //提交
2381
- var sendData = t.state.editFormData;
2382
- sendData.formItem = [];
2383
- var allEditIds = this.getAllEditIds(t.state.editFormData);
2384
- var dataId = "";
2385
- if (allEditIds) {
2386
- dataId = allEditIds.split(",")[0];
2387
- }
2388
- var editType = this.state.editType;
2389
- if (editType == "add" && dataId != "") {
2390
- editType = "edit";
2391
- }
2392
- var param = {
2393
- taskId: this.state.taskId,
2394
- auditorUserIds: auditorUserIds,
2395
- allEditIds: this.getAllEditIds(t.state.editFormData),
2396
- code: this.state.code,
2397
- formData: JSON.stringify(sendData),
2398
- dataId: dataId,
2399
- editType: editType,
2400
- module: this.state.module,
2401
- lock: this.state.lock,
2402
- reminderContent: this.state.reminderContent,
2403
- processInstanceId: this.state.processInstanceId
2404
- };
2405
- var dealActionName = "";
2406
- if (this.state.isStart == true) {
2407
- dealActionName = "提交";
2408
- } else {
2409
- dealActionName = this.state.finalButtons.get("BASE_SUMBIT");
2383
+
2384
+ //上海CA带批示意见加签的需要开启免密校验
2385
+ newComment = this.state.newspyj.content;
2386
+ if (typeof newComment == "undefined" || newComment == '') {
2387
+ newComment = this.state.defaultValue;
2410
2388
  }
2411
- param.dealActionName = dealActionName;
2412
- var nextList = null; //下一个后继节点列表
2413
- var radomList = null; //下一个随机活动节点
2414
- var succeedRange = ""; //后继活动id
2415
- var maxOutgoing = null;
2416
- var nextActivityList = [];
2417
- var nextRadomList = [];
2418
- var nextSelectType = '';
2419
- var isEnd = false;
2420
- var hasRadomList = false; //判断下次办理是否有随机活动节点
2421
- var nextActivityName = '';
2422
- var hasCirculate = this.state.buttons.indexOf("HELP_CIRCULATE") > -1; //是否有传阅
2423
- //if(nextActivityList.length==0){ //没有选择提交下一个节点过
2424
- _db2.default.FlowModuleAPI.getNextActivity(param).then(function (content) {
2425
- if (content.title && content.title != "") {
2426
- var reminderContent = content.title;
2427
- t.setState({
2428
- reminderContent: reminderContent,
2429
- dealReminderContent: reminderContent
2430
- });
2431
- param.reminderContent = reminderContent;
2432
- }
2433
- nextList = content.activityList;
2434
- succeedRange = content.succeedRange == null ? "" : content.succeedRange;
2435
- if (typeof nextList == 'undefined' || nextList == null || nextList == '') {
2436
- nextList = [];
2437
- }
2438
- radomList = content.radomList;
2439
- if (typeof radomList == 'undefined' || radomList == null || radomList == '') {
2440
- radomList = [];
2389
+
2390
+ // 如果需要上海CA校验,先执行异步校验
2391
+ var needSHCACheck = this.state.hasCommentField == '1' && newComment != "" && this.state.commentCasign == "1" && this.state.isCaUser == '1' && this.state.caIsPrd == '1' && this.state.caFirm == 'shca';
2392
+
2393
+ // 定义后续提交逻辑的执行函数
2394
+ var executeSubmitProcess = function executeSubmitProcess() {
2395
+ var sendData = t.state.editFormData;
2396
+ var allEditIds = _this2.getAllEditIds(t.state.editFormData);
2397
+ var dataId = "";
2398
+ if (allEditIds) {
2399
+ dataId = allEditIds.split(",")[0];
2441
2400
  }
2442
- maxOutgoing = content.maxOutgoing;
2443
- if (!maxOutgoing) {
2444
- maxOutgoing = "0";
2401
+ var editType = _this2.state.editType;
2402
+ if (editType == "add" && dataId != "") {
2403
+ editType = "edit";
2445
2404
  }
2446
- if (nextList.length > 0 && typeof nextList[0] != 'undefined') {
2447
- nextActivityName = nextList[0].name;
2405
+ var param = {
2406
+ taskId: _this2.state.taskId,
2407
+ auditorUserIds: auditorUserIds,
2408
+ allEditIds: _this2.getAllEditIds(t.state.editFormData),
2409
+ code: _this2.state.code,
2410
+ formData: JSON.stringify(sendData),
2411
+ dataId: dataId,
2412
+ editType: editType,
2413
+ module: _this2.state.module,
2414
+ lock: _this2.state.lock,
2415
+ reminderContent: _this2.state.reminderContent,
2416
+ processInstanceId: _this2.state.processInstanceId
2417
+ };
2418
+ var dealActionName = "";
2419
+ if (_this2.state.isStart == true) {
2420
+ dealActionName = "提交";
2421
+ } else {
2422
+ dealActionName = _this2.state.finalButtons.get("BASE_SUMBIT");
2448
2423
  }
2449
- if (nextList.length == 0 && radomList.length == 0) {
2450
- if (hasCommentField == "1" || hasCirculate == true) {
2451
- //当有批示意见或者传阅时
2452
- t.setState({
2453
- pageStatus: '1',
2454
- operate: operate,
2455
- urgentHidden: true,
2456
- urgentList: []
2457
- }, function () {
2458
- $(window).scrollTop(0);
2459
- });
2460
- } else {
2424
+ param.dealActionName = dealActionName;
2425
+ var nextList = null; //下一个后继节点列表
2426
+ var radomList = null; //下一个随机活动节点
2427
+ var succeedRange = ""; //后继活动id
2428
+ var maxOutgoing = null;
2429
+ var nextActivityList = [];
2430
+ var nextRadomList = [];
2431
+ var nextSelectType = '';
2432
+ var isEnd = false;
2433
+ var hasRadomList = false; //判断下次办理是否有随机活动节点
2434
+ var nextActivityName = '';
2435
+ var hasCirculate = _this2.state.buttons.indexOf("HELP_CIRCULATE") > -1; //是否有传阅
2436
+ //if(nextActivityList.length==0){ //没有选择提交下一个节点过
2437
+ _db2.default.FlowModuleAPI.getNextActivity(param).then(function (content) {
2438
+ if (content.title && content.title != "") {
2439
+ var reminderContent = content.title;
2461
2440
  t.setState({
2462
- urgentHidden: true,
2463
- urgentList: []
2441
+ reminderContent: reminderContent,
2442
+ dealReminderContent: reminderContent
2464
2443
  });
2465
- t.sendFlow(param);
2444
+ param.reminderContent = reminderContent;
2466
2445
  }
2467
- } else {
2468
- nextList.sort(function compare(a, b) {
2469
- var val1 = parseInt(a['sortNo'] ? a['sortNo'] : '99999999999999');
2470
- var val2 = parseInt(b['sortNo'] ? b['sortNo'] : '99999999999999');
2471
- if (val1 <= val2) {
2472
- return -1;
2473
- } else if (val1 > val2) {
2474
- return 1;
2446
+ nextList = content.activityList;
2447
+ succeedRange = content.succeedRange == null ? "" : content.succeedRange;
2448
+ if (typeof nextList == 'undefined' || nextList == null || nextList == '') {
2449
+ nextList = [];
2450
+ }
2451
+ radomList = content.radomList;
2452
+ if (typeof radomList == 'undefined' || radomList == null || radomList == '') {
2453
+ radomList = [];
2454
+ }
2455
+ maxOutgoing = content.maxOutgoing;
2456
+ if (!maxOutgoing) {
2457
+ maxOutgoing = "0";
2458
+ }
2459
+ if (nextList.length > 0 && typeof nextList[0] != 'undefined') {
2460
+ nextActivityName = nextList[0].name;
2461
+ }
2462
+ if (nextList.length == 0 && radomList.length == 0) {
2463
+ if (hasCommentField == "1" || hasCirculate == true) {
2464
+ //当有批示意见或者传阅时
2465
+ t.setState({
2466
+ pageStatus: '1',
2467
+ operate: operate,
2468
+ urgentHidden: true,
2469
+ urgentList: []
2470
+ }, function () {
2471
+ $(window).scrollTop(0);
2472
+ });
2475
2473
  } else {
2476
- return 0;
2477
- }
2478
- });
2479
- if (nextList.length == 1 && nextList[0]['end']) {
2480
- //下一个后继活动是结束
2481
- isEnd = true;
2482
-
2483
- t.setState({
2484
- urgentHidden: true,
2485
- urgentList: [],
2486
- isEnd: isEnd
2487
- }, function () {
2488
- console.log("sendFlow直接结束");
2489
- param.selectedActivity = '[{"id":"end_node","name":"结束","level":""}]';
2490
- param.comment = newComment;
2491
- param.hasCommentField = t.state.hasCommentField;
2492
- param.attachId = t.state.commentAttachId;
2493
- param.commentId = t.state.commentId;
2474
+ t.setState({
2475
+ urgentHidden: true,
2476
+ urgentList: []
2477
+ });
2494
2478
  t.sendFlow(param);
2495
- });
2496
- return false;
2497
-
2498
- // if(hasCommentField=="0" && hasCirculate==false && radomList.length==0){
2499
- // t.setState({
2500
- // urgentHidden:true,
2501
- // urgentList:[],
2502
- // isEnd:isEnd
2503
- // },function(){
2504
- // param.selectedActivity='[{"id":"end_node","name":"结束","level":""}]';
2505
- // t.sendFlow(param);
2506
- // });
2507
- // return false;
2508
- // }
2509
- }
2510
- //let tasktype = t.state.tasktype;
2511
- var urgentHidden = false;
2512
- // var path = '#/approval/approve-choosenode/';
2513
- var checkActi = "0"; //判断是不是默认选中一个节点
2514
- //hasRadomList = true;//下个节点有随机活动
2515
- //后继活动
2516
- // let urgentSelectList = [];
2517
- var urgentList = [];
2518
- var endSelect = false;
2519
- if (nextList.length == 1 && nextList[0]['end']) {
2520
- //结束
2521
- //urgentHidden = true;
2522
- endSelect = true;
2523
- var endItem = nextList[0];
2524
- var checkedItem = {};
2525
- checkedItem.value = endItem.id;
2526
- checkedItem.name = endItem.name;
2527
- checkedItem.arrow = true;
2528
- checkedItem.show = false;
2529
- checkedItem.type = endItem.type;
2530
- checkedItem.end = endItem.end;
2531
- checkedItem.disable = false;
2532
- checkedItem.maxOutgoing = maxOutgoing;
2533
- // if(hasRadomList){//当有随机节点时,不选中
2534
- // checkedItem.checked = false;
2535
- // }else{
2536
- checkedItem.checked = true;
2537
- checkedItem.must = true;
2538
- //nextSelectType="next";
2539
- //}
2540
- checkedItem.personValue = [];
2541
- checkedItem.commonUsedData = [];
2542
- nextActivityList.push(checkedItem);
2543
-
2544
- //紧急
2545
- var urgent = t.state.urgent;
2546
- urgentList = t.state.urgentList;
2547
- //if(hasRadomList == false){//当没有随机节点时隐藏紧急
2548
- urgentHidden = true;
2549
- //}
2550
- //if(urgentHidden == false){ //当紧急状态显示时把判断是否选中值
2551
- if (urgent == '1') {
2552
- urgentList[0].checked = true;
2553
- // urgentSelectList = urgentList;
2554
2479
  }
2555
- //}
2556
2480
  } else {
2557
- var show = true;
2558
- var isRadio = maxOutgoing == 1;
2559
- var no = 0; //随机节点数量
2560
- nextList.map(function (item) {
2561
- if (item.nodeType == 'radom') {
2562
- //随机
2563
- var nextSucceedRange = "";
2564
- var nowLevel = t.state.level;
2565
- if (item.id == t.state.activityId) {
2566
- //当下个活动节点是当前节点在同一个随机活动时
2567
- nextSucceedRange = succeedRange;
2568
- } else {
2569
- nextSucceedRange = "";
2570
- }
2571
- var returnParam = t.dealwithRadomList(item, radomList, item.must, maxOutgoing, checkActi, nextSucceedRange, nowLevel, no);
2572
- ++no;
2573
- var randomItem = returnParam.randomItem;
2574
- checkActi = returnParam.checkActi;
2575
- if (randomItem != null && randomItem.subRandomList != null && randomItem.subRandomList.length > 0) {
2576
- nextRadomList.push(randomItem);
2577
- }
2578
- return false;
2481
+ nextList.sort(function compare(a, b) {
2482
+ var val1 = parseInt(a['sortNo'] ? a['sortNo'] : '99999999999999');
2483
+ var val2 = parseInt(b['sortNo'] ? b['sortNo'] : '99999999999999');
2484
+ if (val1 <= val2) {
2485
+ return -1;
2486
+ } else if (val1 > val2) {
2487
+ return 1;
2488
+ } else {
2489
+ return 0;
2579
2490
  }
2491
+ });
2492
+ if (nextList.length == 1 && nextList[0]['end'] && !hasCirculate) {
2493
+ //下一个后继活动是结束
2494
+ isEnd = true;
2495
+
2496
+ t.setState({
2497
+ urgentHidden: true,
2498
+ urgentList: [],
2499
+ isEnd: isEnd
2500
+ }, function () {
2501
+ console.log("sendFlow直接结束");
2502
+ param.selectedActivity = '[{"id":"end_node","name":"结束","level":""}]';
2503
+ param.comment = newComment;
2504
+ param.hasCommentField = t.state.hasCommentField;
2505
+ param.attachId = t.state.commentAttachId;
2506
+ param.commentId = t.state.commentId;
2507
+ t.sendFlow(param);
2508
+ });
2509
+ return false;
2510
+
2511
+ // if(hasCommentField=="0" && hasCirculate==false && radomList.length==0){
2512
+ // t.setState({
2513
+ // urgentHidden:true,
2514
+ // urgentList:[],
2515
+ // isEnd:isEnd
2516
+ // },function(){
2517
+ // param.selectedActivity='[{"id":"end_node","name":"结束","level":""}]';
2518
+ // t.sendFlow(param);
2519
+ // });
2520
+ // return false;
2521
+ // }
2522
+ }
2523
+ //let tasktype = t.state.tasktype;
2524
+ var urgentHidden = false;
2525
+ // var path = '#/approval/approve-choosenode/';
2526
+ var checkActi = "0"; //判断是不是默认选中一个节点
2527
+ //hasRadomList = true;//下个节点有随机活动
2528
+ //后继活动
2529
+ // let urgentSelectList = [];
2530
+ var urgentList = [];
2531
+ var endSelect = false;
2532
+ if (nextList.length == 1 && nextList[0]['end']) {
2533
+ //结束
2534
+ //urgentHidden = true;
2535
+ endSelect = true;
2536
+ var endItem = nextList[0];
2580
2537
  var checkedItem = {};
2581
- var selectUserReadOnly = false;
2582
- var personValue = []; //选中的人
2583
- var personValues = []; //备选的人
2584
- var participantMode = item.participantMode; //判断选人是单选还是多选
2585
- var commonUsedData = []; //自定义选人的范围,常用
2586
- var commonTreeData = [];
2587
- var popCode = "";
2588
- var chooseType = "";
2589
- var type3ParNum = 0;
2590
- var participants = item.participants;
2591
- if (item.type == 3) {
2592
- //指定人选择
2593
- selectUserReadOnly = true;
2594
- popCode = 'org,group'; //选人组件code
2595
- chooseType = "userNotOrg,userNotGroup";
2596
- var participantList = item.participantList;
2597
- participants = '';
2598
- if (participantList != null && participantList != "" && participantList.length > 0) {
2599
- for (var i = 0; i < participantList.length; i++) {
2600
- if (participantList[i].type != "user") {
2601
- var children = participantList[i];
2602
- for (var j = 0; j < children.length; j++) {
2603
- var personValueItem = { scopeType: "user", scopeValue: children[j].id, scopeName: children[j].userName, imageId: "", orgNamePath: children[j].orgPath };
2538
+ checkedItem.value = endItem.id;
2539
+ checkedItem.name = endItem.name;
2540
+ checkedItem.arrow = true;
2541
+ checkedItem.show = false;
2542
+ checkedItem.type = endItem.type;
2543
+ checkedItem.end = endItem.end;
2544
+ checkedItem.disable = false;
2545
+ checkedItem.maxOutgoing = maxOutgoing;
2546
+ // if(hasRadomList){//当有随机节点时,不选中
2547
+ // checkedItem.checked = false;
2548
+ // }else{
2549
+ checkedItem.checked = true;
2550
+ checkedItem.must = true;
2551
+ //nextSelectType="next";
2552
+ //}
2553
+ checkedItem.personValue = [];
2554
+ checkedItem.commonUsedData = [];
2555
+ nextActivityList.push(checkedItem);
2556
+
2557
+ //紧急
2558
+ var urgent = t.state.urgent;
2559
+ urgentList = t.state.urgentList;
2560
+ //if(hasRadomList == false){//当没有随机节点时隐藏紧急
2561
+ urgentHidden = true;
2562
+ //}
2563
+ //if(urgentHidden == false){ //当紧急状态显示时把判断是否选中值
2564
+ if (urgent == '1') {
2565
+ urgentList[0].checked = true;
2566
+ // urgentSelectList = urgentList;
2567
+ }
2568
+ //}
2569
+ } else {
2570
+ var show = true;
2571
+ var isRadio = maxOutgoing == 1;
2572
+ var no = 0; //随机节点数量
2573
+ nextList.map(function (item) {
2574
+ if (item.nodeType == 'radom') {
2575
+ //随机
2576
+ var nextSucceedRange = "";
2577
+ var nowLevel = t.state.level;
2578
+ if (item.id == t.state.activityId) {
2579
+ //当下个活动节点是当前节点在同一个随机活动时
2580
+ nextSucceedRange = succeedRange;
2581
+ } else {
2582
+ nextSucceedRange = "";
2583
+ }
2584
+ var returnParam = t.dealwithRadomList(item, radomList, item.must, maxOutgoing, checkActi, nextSucceedRange, nowLevel, no);
2585
+ ++no;
2586
+ var randomItem = returnParam.randomItem;
2587
+ checkActi = returnParam.checkActi;
2588
+ if (randomItem != null && randomItem.subRandomList != null && randomItem.subRandomList.length > 0) {
2589
+ nextRadomList.push(randomItem);
2590
+ }
2591
+ return false;
2592
+ }
2593
+ var checkedItem = {};
2594
+ var selectUserReadOnly = false;
2595
+ var personValue = []; //选中的人
2596
+ var personValues = []; //备选的人
2597
+ var participantMode = item.participantMode; //判断选人是单选还是多选
2598
+ var commonUsedData = []; //自定义选人的范围,常用
2599
+ var commonTreeData = [];
2600
+ var popCode = "";
2601
+ var chooseType = "";
2602
+ var type3ParNum = 0;
2603
+ var participants = item.participants;
2604
+ if (item.type == 3) {
2605
+ //指定人选择
2606
+ selectUserReadOnly = true;
2607
+ popCode = 'org,group'; //选人组件code
2608
+ chooseType = "userNotOrg,userNotGroup";
2609
+ var participantList = item.participantList;
2610
+ participants = '';
2611
+ if (participantList != null && participantList != "" && participantList.length > 0) {
2612
+ for (var i = 0; i < participantList.length; i++) {
2613
+ if (participantList[i].type != "user") {
2614
+ var children = participantList[i];
2615
+ for (var j = 0; j < children.length; j++) {
2616
+ var personValueItem = { scopeType: "user", scopeValue: children[j].id, scopeName: children[j].userName, imageId: "", orgNamePath: children[j].orgPath };
2617
+ personValues.push(personValueItem);
2618
+ type3ParNum++;
2619
+ }
2620
+ } else {
2621
+ var personValueItem = { scopeType: "user", scopeValue: participantList[i].id, scopeName: participantList[i].name, imageId: "", orgNamePath: participantList[i].orgPath };
2604
2622
  personValues.push(personValueItem);
2605
2623
  type3ParNum++;
2606
2624
  }
2625
+ }
2626
+ if (type3ParNum > 1 && participantMode == '0') {
2627
+ item.type = 2;
2607
2628
  } else {
2608
- var personValueItem = { scopeType: "user", scopeValue: participantList[i].id, scopeName: participantList[i].name, imageId: "", orgNamePath: participantList[i].orgPath };
2609
- personValues.push(personValueItem);
2610
- type3ParNum++;
2629
+ personValue = personValues;
2611
2630
  }
2612
2631
  }
2613
- if (type3ParNum > 1 && participantMode == '0') {
2614
- item.type = 2;
2615
- } else {
2616
- personValue = personValues;
2632
+ if (type3ParNum == 0) {
2633
+ item.type = 1;
2617
2634
  }
2618
2635
  }
2619
- if (type3ParNum == 0) {
2620
- item.type = 1;
2621
- }
2622
- }
2623
2636
 
2624
- if (item.type == 1) {
2625
- //选择所有人
2626
- selectUserReadOnly = false;
2627
- chooseType = "userNotOrg,userNotGroup";
2628
- if (item.nodeType == 'readtask') {
2629
- //如果是传阅节点
2637
+ if (item.type == 1) {
2638
+ //选择所有人
2639
+ selectUserReadOnly = false;
2630
2640
  chooseType = "userNotOrg,userNotGroup";
2631
- }
2632
- var commonUsedId = ''; //常用选择范围
2633
- var participantList = item.participantList;
2634
- var participantListNew = item.participantListNew;
2635
- if (participantListNew != null && participantListNew != "" && participantListNew.length > 0) {
2636
- commonTreeData = participantListNew;
2637
- }
2641
+ if (item.nodeType == 'readtask') {
2642
+ //如果是传阅节点
2643
+ chooseType = "userNotOrg,userNotGroup";
2644
+ }
2645
+ var commonUsedId = ''; //常用选择范围
2646
+ var participantList = item.participantList;
2647
+ var participantListNew = item.participantListNew;
2648
+ if (participantListNew != null && participantListNew != "" && participantListNew.length > 0) {
2649
+ commonTreeData = participantListNew;
2650
+ }
2638
2651
 
2639
- participants = '';
2640
- if (participantList != null && participantList != "" && participantList.length > 0) {
2641
- for (var i = 0; i < participantList.length; i++) {
2642
- if (participantList[i].type != "user") {
2643
- var children = participantList[i];
2644
- for (var j = 0; j < children.length; j++) {
2645
- if (commonUsedId.split(",").indexOf(children[j].id) == -1) {
2646
- commonUsedId += children[j].id + ',';
2652
+ participants = '';
2653
+ if (participantList != null && participantList != "" && participantList.length > 0) {
2654
+ for (var i = 0; i < participantList.length; i++) {
2655
+ if (participantList[i].type != "user") {
2656
+ var children = participantList[i];
2657
+ for (var j = 0; j < children.length; j++) {
2658
+ if (commonUsedId.split(",").indexOf(children[j].id) == -1) {
2659
+ commonUsedId += children[j].id + ',';
2660
+ commonUsedData.push(personValueItem);
2661
+ if (item.partType == '1') {
2662
+ personValue.push(personValueItem);
2663
+ }
2664
+ }
2665
+ }
2666
+ } else {
2667
+ var personValueItem = { scopeType: participantList[i].type, scopeValue: participantList[i].id, scopeName: participantList[i].name, imageId: "", orgNamePath: participantList[i].orgPath };
2668
+ if (commonUsedId.split(",").indexOf(participantList[i].id) == -1) {
2669
+ commonUsedId += participantList[i].id + ',';
2647
2670
  commonUsedData.push(personValueItem);
2648
2671
  if (item.partType == '1') {
2649
2672
  personValue.push(personValueItem);
2650
2673
  }
2651
2674
  }
2652
2675
  }
2653
- } else {
2654
- var personValueItem = { scopeType: participantList[i].type, scopeValue: participantList[i].id, scopeName: participantList[i].name, imageId: "", orgNamePath: participantList[i].orgPath };
2655
- if (commonUsedId.split(",").indexOf(participantList[i].id) == -1) {
2656
- commonUsedId += participantList[i].id + ',';
2657
- commonUsedData.push(personValueItem);
2658
- if (item.partType == '1') {
2659
- personValue.push(personValueItem);
2660
- }
2661
- }
2662
2676
  }
2663
- }
2664
- if (commonUsedData.length > 0) {
2665
- popCode = "common,org,group";
2666
- popCode = "common,org,group,duty,politicalOutlook";
2667
- chooseType = "userNotOrg,userNotGroup,userNotDuty,userNotPoliticalOutlook";
2668
- if (commonUsedData.length == 1) {
2669
- personValue = commonUsedData;
2677
+ if (commonUsedData.length > 0) {
2678
+ popCode = "common,org,group";
2679
+ popCode = "common,org,group,duty,politicalOutlook";
2680
+ chooseType = "userNotOrg,userNotGroup,userNotDuty,userNotPoliticalOutlook";
2681
+ if (commonUsedData.length == 1) {
2682
+ personValue = commonUsedData;
2683
+ }
2684
+ } else {
2685
+ popCode = "org,group";
2686
+ popCode = "org,group,duty,politicalOutlook";
2687
+ chooseType = "userNotOrg,userNotGroup,userNotDuty,userNotPoliticalOutlook";
2670
2688
  }
2671
2689
  } else {
2672
- popCode = "org,group";
2690
+ chooseType = "userNotOrg";
2691
+ popCode = "org";
2673
2692
  popCode = "org,group,duty,politicalOutlook";
2674
2693
  chooseType = "userNotOrg,userNotGroup,userNotDuty,userNotPoliticalOutlook";
2675
2694
  }
2676
- } else {
2677
- chooseType = "userNotOrg";
2678
- popCode = "org";
2679
- popCode = "org,group,duty,politicalOutlook";
2680
- chooseType = "userNotOrg,userNotGroup,userNotDuty,userNotPoliticalOutlook";
2681
2695
  }
2682
- }
2683
2696
 
2684
- if (item.type == 2) {
2685
- //指定候选人
2686
- selectUserReadOnly = false;
2687
- popCode = 'common'; //选人组件code
2688
- chooseType = "userNotOrg,userNotGroup";
2689
- var commonUsedId = ''; //常用选择范围
2690
- var participantList = item.participantList;
2691
- var participantListNew = item.participantListNew;
2692
- if (participantListNew != null && participantListNew != "" && participantListNew.length > 0) {
2693
- commonTreeData = participantListNew;
2694
- }
2695
- if (participantList != null && participantList != "" && participantList.length > 0) {
2696
- for (var i = 0; i < participantList.length; i++) {
2697
- if (participantList[i].type != "user") {
2698
- /* var children = participantList[i];
2699
- for(var j=0; j<children.length; j++ ){
2700
- var personValueItem = {scopeType:"user",scopeValue:children[j].id,scopeName:children[j].userName,imageId:""};
2701
- if(commonUsedId.indexOf(children[j].id) == -1){
2702
- commonUsedId += children[j].id+',';
2703
- commonUsedData.push(personValueItem);
2704
- }
2705
- }*/
2706
- } else if (participantList[i].secretLevel == 0 || participantList[i].secretLevel || !participantList[i].orgId) {
2707
- var personValueItem = { scopeType: "user", scopeValue: participantList[i].id, scopeName: participantList[i].name, imageId: "", orgNamePath: participantList[i].orgPath };
2708
- if (commonUsedId.split(",").indexOf(participantList[i].id) == -1) {
2709
- commonUsedId += participantList[i].id + ',';
2710
- commonUsedData.push(personValueItem);
2711
- if (item.partType == '1') {
2712
- personValue.push(personValueItem);
2697
+ if (item.type == 2) {
2698
+ //指定候选人
2699
+ selectUserReadOnly = false;
2700
+ popCode = 'common'; //选人组件code
2701
+ chooseType = "userNotOrg,userNotGroup";
2702
+ var commonUsedId = ''; //常用选择范围
2703
+ var participantList = item.participantList;
2704
+ var participantListNew = item.participantListNew;
2705
+ if (participantListNew != null && participantListNew != "" && participantListNew.length > 0) {
2706
+ commonTreeData = participantListNew;
2707
+ }
2708
+ if (participantList != null && participantList != "" && participantList.length > 0) {
2709
+ for (var i = 0; i < participantList.length; i++) {
2710
+ if (participantList[i].type != "user") {
2711
+ /* var children = participantList[i];
2712
+ for(var j=0; j<children.length; j++ ){
2713
+ var personValueItem = {scopeType:"user",scopeValue:children[j].id,scopeName:children[j].userName,imageId:""};
2714
+ if(commonUsedId.indexOf(children[j].id) == -1){
2715
+ commonUsedId += children[j].id+',';
2716
+ commonUsedData.push(personValueItem);
2717
+ }
2718
+ }*/
2719
+ } else if (participantList[i].secretLevel == 0 || participantList[i].secretLevel || !participantList[i].orgId) {
2720
+ var personValueItem = { scopeType: "user", scopeValue: participantList[i].id, scopeName: participantList[i].name, imageId: "", orgNamePath: participantList[i].orgPath };
2721
+ if (commonUsedId.split(",").indexOf(participantList[i].id) == -1) {
2722
+ commonUsedId += participantList[i].id + ',';
2723
+ commonUsedData.push(personValueItem);
2724
+ if (item.partType == '1') {
2725
+ personValue.push(personValueItem);
2726
+ }
2713
2727
  }
2714
2728
  }
2715
2729
  }
2730
+ if (commonUsedData.length == 1) {
2731
+ personValue = commonUsedData;
2732
+ }
2733
+ } else {
2734
+ item.type = 1;
2735
+ chooseType = "userNotOrg";
2736
+ popCode = "org";
2716
2737
  }
2717
- if (commonUsedData.length == 1) {
2718
- personValue = commonUsedData;
2719
- }
2738
+ } else if (item.type == 4) {
2739
+ //办理完毕
2740
+ commonUsedData = [];
2741
+ personValue = [];
2742
+ show = false;
2743
+ item.end = true;
2744
+ popCode = '';
2745
+ chooseType = '';
2746
+ }
2747
+ if (item.nodeType == 'readtask') {
2748
+ //如果是传阅节点
2749
+ t.state.isHideRead = true;
2750
+ }
2751
+ checkedItem.code = popCode;
2752
+ checkedItem.chooseType = chooseType;
2753
+ checkedItem.commonUsedData = commonUsedData;
2754
+ checkedItem.commonTreeData = commonTreeData;
2755
+ checkedItem.participantMode = participantMode; //选人单选还是多选,1多选,0单选
2756
+ checkedItem.personValue = personValue;
2757
+ checkedItem.selectUserReadOnly = selectUserReadOnly;
2758
+ checkedItem.value = item.id;
2759
+ checkedItem.name = item.name;
2760
+ checkedItem.arrow = true;
2761
+ checkedItem.show = show;
2762
+ checkedItem.type = item.type;
2763
+ checkedItem.end = item.end;
2764
+ checkedItem.must = item.must;
2765
+ checkedItem.participants = participants;
2766
+ if (item.end == true) {
2767
+ isEnd = true;
2768
+ }
2769
+ checkedItem.level = item.level;
2770
+ checkedItem.maxOutgoing = maxOutgoing;
2771
+ if (item.must == true && (maxOutgoing == 1 && checkActi == 0 || maxOutgoing == 0)) {
2772
+ //必须
2773
+ checkedItem.disable = false;
2774
+ checkedItem.checked = true;
2775
+ //nextSelectType = 'next';
2776
+ checkActi = "1";
2777
+ } else if (item.defaultFlow == true && (maxOutgoing == 1 && checkActi == 0 || maxOutgoing == 0)) {
2778
+ //默认节点
2779
+ checkedItem.disable = false;
2780
+ checkedItem.checked = true;
2781
+ //nextSelectType = 'next';
2782
+ checkActi = "1";
2720
2783
  } else {
2721
- item.type = 1;
2722
- chooseType = "userNotOrg";
2723
- popCode = "org";
2784
+ checkedItem.disable = false;
2785
+ checkedItem.checked = false;
2786
+ }
2787
+ if (item.type == 4 && radomList.length == 0) {
2788
+ //当类型是完成结束时且随机活动没有
2789
+ checkedItem.checked = true;
2790
+ }
2791
+ if (checkedItem.checked == true && checkedItem.end == true) {
2792
+ //当结束节点且选中时
2793
+ // t.setState({
2794
+ // urgentHidden:true,
2795
+ // urgentList:[]
2796
+ // });
2797
+ urgentHidden = true;
2798
+ }
2799
+ checkedItem.isRadio = isRadio; //判断是否是单选还是多选
2800
+ nextActivityList.push(checkedItem);
2801
+ });
2802
+ if (checkActi == "0" && isRadio == true) {
2803
+ //如果没有默认选中的下一个节点且是单选,则第一个默认选中
2804
+ if (nextActivityList.length > 0 && nextRadomList.length == 0) {
2805
+ nextActivityList[0].checked = true;
2806
+ //nextSelectType = 'next';
2807
+ } else if (nextRadomList.length > 0 && nextActivityList.length == 0) {
2808
+ nextRadomList[0].subRandomList[0].checked = true;
2809
+ //nextSelectType = 'radom';
2724
2810
  }
2725
- } else if (item.type == 4) {
2726
- //办理完毕
2727
- commonUsedData = [];
2728
- personValue = [];
2729
- show = false;
2730
- item.end = true;
2731
- popCode = '';
2732
- chooseType = '';
2733
- }
2734
- if (item.nodeType == 'readtask') {
2735
- //如果是传阅节点
2736
- t.state.isHideRead = true;
2737
- }
2738
- checkedItem.code = popCode;
2739
- checkedItem.chooseType = chooseType;
2740
- checkedItem.commonUsedData = commonUsedData;
2741
- checkedItem.commonTreeData = commonTreeData;
2742
- checkedItem.participantMode = participantMode; //选人单选还是多选,1多选,0单选
2743
- checkedItem.personValue = personValue;
2744
- checkedItem.selectUserReadOnly = selectUserReadOnly;
2745
- checkedItem.value = item.id;
2746
- checkedItem.name = item.name;
2747
- checkedItem.arrow = true;
2748
- checkedItem.show = show;
2749
- checkedItem.type = item.type;
2750
- checkedItem.end = item.end;
2751
- checkedItem.must = item.must;
2752
- checkedItem.participants = participants;
2753
- if (item.end == true) {
2754
- isEnd = true;
2755
- }
2756
- checkedItem.level = item.level;
2757
- checkedItem.maxOutgoing = maxOutgoing;
2758
- if (item.must == true && (maxOutgoing == 1 && checkActi == 0 || maxOutgoing == 0)) {
2759
- //必须
2760
- checkedItem.disable = false;
2761
- checkedItem.checked = true;
2762
- //nextSelectType = 'next';
2763
- checkActi = "1";
2764
- } else if (item.defaultFlow == true && (maxOutgoing == 1 && checkActi == 0 || maxOutgoing == 0)) {
2765
- //默认节点
2766
- checkedItem.disable = false;
2767
- checkedItem.checked = true;
2768
- //nextSelectType = 'next';
2769
- checkActi = "1";
2770
- } else {
2771
- checkedItem.disable = false;
2772
- checkedItem.checked = false;
2773
- }
2774
- if (item.type == 4 && radomList.length == 0) {
2775
- //当类型是完成结束时且随机活动没有
2776
- checkedItem.checked = true;
2777
- }
2778
- if (checkedItem.checked == true && checkedItem.end == true) {
2779
- //当结束节点且选中时
2780
- // t.setState({
2781
- // urgentHidden:true,
2782
- // urgentList:[]
2783
- // });
2784
- urgentHidden = true;
2785
- }
2786
- checkedItem.isRadio = isRadio; //判断是否是单选还是多选
2787
- nextActivityList.push(checkedItem);
2788
- });
2789
- if (checkActi == "0" && isRadio == true) {
2790
- //如果没有默认选中的下一个节点且是单选,则第一个默认选中
2791
- if (nextActivityList.length > 0 && nextRadomList.length == 0) {
2792
- nextActivityList[0].checked = true;
2793
- //nextSelectType = 'next';
2794
- } else if (nextRadomList.length > 0 && nextActivityList.length == 0) {
2795
- nextRadomList[0].subRandomList[0].checked = true;
2796
- //nextSelectType = 'radom';
2797
2811
  }
2798
- }
2799
2812
 
2800
- //紧急
2801
- var _urgent = t.state.urgent;
2802
- urgentList = t.state.urgentList;
2803
- if (urgentHidden == false) {
2804
- //当紧急状态显示时把判断是否选中值
2805
- if (_urgent == '1') {
2806
- urgentList[0].checked = true;
2807
- // urgentSelectList = urgentList;
2813
+ //紧急
2814
+ var _urgent = t.state.urgent;
2815
+ urgentList = t.state.urgentList;
2816
+ if (urgentHidden == false) {
2817
+ //当紧急状态显示时把判断是否选中值
2818
+ if (_urgent == '1') {
2819
+ urgentList[0].checked = true;
2820
+ // urgentSelectList = urgentList;
2821
+ }
2808
2822
  }
2809
2823
  }
2810
- }
2811
- t.setState({
2812
- //nextSelectType:nextSelectType,
2813
- nextRadomList: nextRadomList,
2814
- nextActivityList: nextActivityList,
2815
- pageStatus: '1',
2816
- operate: operate,
2817
- // urgentSelectList:urgentSelectList,
2818
- urgentList: urgentList,
2819
- urgentHidden: urgentHidden,
2820
- isEnd: isEnd,
2821
- nextActivityName: nextActivityName,
2822
- endSelect: endSelect
2823
- }, function () {
2824
- for (var i = 0; i < nextActivityList.length; i++) {
2825
- if (nextActivityList[i].personValue.length > 0 || nextActivityList[i].commonUsedData.length > 0) {
2826
- t.refs[nextActivityList[i].value + "_" + i].initSelectData();
2824
+ t.setState({
2825
+ //nextSelectType:nextSelectType,
2826
+ nextRadomList: nextRadomList,
2827
+ nextActivityList: nextActivityList,
2828
+ pageStatus: '1',
2829
+ operate: operate,
2830
+ // urgentSelectList:urgentSelectList,
2831
+ urgentList: urgentList,
2832
+ urgentHidden: urgentHidden,
2833
+ isEnd: isEnd,
2834
+ nextActivityName: nextActivityName,
2835
+ endSelect: endSelect
2836
+ }, function () {
2837
+ for (var i = 0; i < nextActivityList.length; i++) {
2838
+ if (nextActivityList[i].personValue.length > 0 || nextActivityList[i].commonUsedData.length > 0) {
2839
+ t.refs[nextActivityList[i].value + "_" + i].initSelectData();
2840
+ }
2827
2841
  }
2828
- }
2829
- for (var i = 0; i < nextRadomList.length; i++) {
2830
- var nextRadomListItem = nextRadomList[i].subRandomList;
2831
- for (var j = 0; j < nextRadomListItem.length; j++) {
2832
- if (nextRadomListItem[j].personValue.length > 0 || nextRadomListItem[j].commonUsedData.length > 0) {
2833
- t.refs[nextRadomListItem[j].value + "_" + j].initSelectData();
2842
+ for (var i = 0; i < nextRadomList.length; i++) {
2843
+ var nextRadomListItem = nextRadomList[i].subRandomList;
2844
+ for (var j = 0; j < nextRadomListItem.length; j++) {
2845
+ if (nextRadomListItem[j].personValue.length > 0 || nextRadomListItem[j].commonUsedData.length > 0) {
2846
+ t.refs[nextRadomListItem[j].value + "_" + j].initSelectData();
2847
+ }
2834
2848
  }
2835
2849
  }
2836
- }
2837
- $(window).scrollTop(0);
2838
- });
2839
- }
2840
- }).catch(function (error) {
2841
- if (typeof error.errorMsg == 'undefined') {
2842
- setTimeout(function () {
2843
- _Toast2.default.show({
2844
- type: 'error',
2845
- content: '获取下个办理节点出错'
2846
- });
2847
- }, 800);
2848
- } else if (error.errorMsg.indexOf("待办任务不存在") != -1) {
2849
- setTimeout(function () {
2850
- _Toast2.default.show({
2851
- type: 'error',
2852
- content: '流程已办理!'
2850
+ $(window).scrollTop(0);
2853
2851
  });
2854
- }, 800);
2855
- } else {
2856
- setTimeout(function () {
2852
+ }
2853
+ }).catch(function (error) {
2854
+ if (typeof error.errorMsg == 'undefined') {
2855
+ setTimeout(function () {
2856
+ _Toast2.default.show({
2857
+ type: 'error',
2858
+ content: '获取下个办理节点出错'
2859
+ });
2860
+ }, 800);
2861
+ } else if (error.errorMsg.indexOf("待办任务不存在") != -1) {
2862
+ setTimeout(function () {
2863
+ _Toast2.default.show({
2864
+ type: 'error',
2865
+ content: '流程已办理!'
2866
+ });
2867
+ }, 800);
2868
+ } else {
2869
+ setTimeout(function () {
2870
+ _Toast2.default.show({
2871
+ type: 'error',
2872
+ content: error.errorMsg
2873
+ });
2874
+ }, 800);
2875
+ }
2876
+ });
2877
+ // }else{
2878
+ // t.setState({
2879
+ // pageStatus:'1',
2880
+ // operate: operate
2881
+ // },function(){
2882
+ // $(window).scrollTop(0);
2883
+ // });
2884
+ // }
2885
+ // }
2886
+ }; // 闭合executeSubmitProcess函数
2887
+
2888
+ // 如果需要CA校验,先执行异步校验;否则直接执行提交逻辑
2889
+ if (needSHCACheck) {
2890
+ t.checkSHCAisTrust(this.guid2(), newComment).then(function (shCATrustFlag) {
2891
+ if (shCATrustFlag) {
2857
2892
  _Toast2.default.show({
2858
2893
  type: 'error',
2859
- content: error.errorMsg
2894
+ content: '请先到云医签APP密码管理开启推送免密后再提交流程'
2860
2895
  });
2861
- }, 800);
2862
- }
2863
- });
2864
- // }else{
2865
- // t.setState({
2866
- // pageStatus:'1',
2867
- // operate: operate
2868
- // },function(){
2869
- // $(window).scrollTop(0);
2870
- // });
2871
- // }
2872
- // }
2896
+ return;
2897
+ }
2898
+ // 校验通过,执行提交逻辑
2899
+ executeSubmitProcess();
2900
+ }).catch(function () {
2901
+ // 错误已在checkSHCAisTrust中处理,这里只阻止继续执行
2902
+ return;
2903
+ });
2904
+ } else {
2905
+ // 不需要CA校验,直接执行提交逻辑
2906
+ executeSubmitProcess();
2907
+ }
2873
2908
  } else if (operate == 2) {
2874
2909
  //驳回
2875
2910
  var buttons = t.state.buttons;
@@ -3954,7 +3989,6 @@ var PageHome = function (_React$Component) {
3954
3989
  dealActionName = '通过';
3955
3990
  }
3956
3991
  param.dealActionName = dealActionName;
3957
-
3958
3992
  this.sendFlow(param);
3959
3993
  } else if (operate == 2) {
3960
3994
  //退回
@@ -4918,6 +4952,7 @@ var PageHome = function (_React$Component) {
4918
4952
  // param.commentbizSn=commentbizSn;
4919
4953
  // }
4920
4954
  param.commentbizSn = commentbizSn;
4955
+
4921
4956
  var db = _db2.default;
4922
4957
  db.FlowModuleAPI.sendFlow(param).then(function (content) {
4923
4958
  _Toast2.default.show({
@@ -5076,6 +5111,33 @@ var PageHome = function (_React$Component) {
5076
5111
  });
5077
5112
  }
5078
5113
  }
5114
+ //上海CA检查是否免密
5115
+
5116
+ }, {
5117
+ key: 'checkSHCAisTrust',
5118
+ value: function checkSHCAisTrust(commentbizSn, comment) {
5119
+ console.log("上海CA带批示意见加签的需要开启免密校验===" + comment);
5120
+ var loginUserInfo = getLoginUserInfo();
5121
+ return _db2.default.FlowApproval.signCA({
5122
+ bizSn: commentbizSn,
5123
+ relationId: loginUserInfo.mobile,
5124
+ msg: comment,
5125
+ fileName: loginUserInfo.mobile
5126
+ }).then(function (content) {
5127
+ // 返回是否为免密状态
5128
+ return content && content.isTrust === '1';
5129
+ }).catch(function (error) {
5130
+ console.error('上海CA免密校验失败:', error);
5131
+ // 错误时显示提示,并返回false表示校验失败
5132
+ setTimeout(function () {
5133
+ _Toast2.default.show({
5134
+ type: 'error',
5135
+ content: error.errorMsg || '免密校验失败,请重试'
5136
+ });
5137
+ }, 800);
5138
+ return false;
5139
+ });
5140
+ }
5079
5141
  //获取批示意见加签随机数
5080
5142
 
5081
5143
  }, {
@@ -6356,7 +6418,7 @@ var PageHome = function (_React$Component) {
6356
6418
  }, {
6357
6419
  key: 'getListButtonsByCodes',
6358
6420
  value: function getListButtonsByCodes(buttonCodes, dataId, isStart, extensionButtonList) {
6359
- var _this2 = this;
6421
+ var _this3 = this;
6360
6422
 
6361
6423
  // buttonCodes=buttonCodes.replace('OTHER_RELATION','');
6362
6424
  // buttonCodes=buttonCodes.replace('MAILSEND','');
@@ -6378,8 +6440,8 @@ var PageHome = function (_React$Component) {
6378
6440
  // });
6379
6441
  var mobileExt;
6380
6442
  var mobileFormExt;
6381
- var formKey = _this2.state.formKey;
6382
- var module = _this2.state.module;
6443
+ var formKey = _this3.state.formKey;
6444
+ var module = _this3.state.module;
6383
6445
  try {
6384
6446
  if (module) {
6385
6447
  mobileExt = typeof eval(module + "_mobileExt") !== 'undefined' ? eval(module + "_mobileExt") : null;
@@ -6402,10 +6464,10 @@ var PageHome = function (_React$Component) {
6402
6464
  var actionSheetButtonOptName = [];
6403
6465
  var buttonIsMore = false;
6404
6466
  var buttonList = [];
6405
- var sysWatermark = _this2.state.sysWatermark;
6467
+ var sysWatermark = _this3.state.sysWatermark;
6406
6468
  /* buttonCodeList.push({'buttonCode':'BASE_SUMBIT','buttonName':'通过'});
6407
6469
  buttonCodeList.push({'buttonCode':'PAGE_SAVE','buttonName':'保存'});*/
6408
- if (_this2.state.subProcessCode && _this2.state.subProcessCode != '') {
6470
+ if (_this3.state.subProcessCode && _this3.state.subProcessCode != '') {
6409
6471
  buttonCodeList.push({ 'buttonCode': 'subprocess', 'buttonName': '发起子流程' });
6410
6472
  }
6411
6473
  buttonCodeList = buttonCodeList.concat();
@@ -6509,7 +6571,7 @@ var PageHome = function (_React$Component) {
6509
6571
  }
6510
6572
  }
6511
6573
 
6512
- _this2.setState({
6574
+ _this3.setState({
6513
6575
  buttonCodeList: content,
6514
6576
  buttonList: buttonList,
6515
6577
  actionSheetButtonOpt: actionSheetButtonOpt,
@@ -7580,7 +7642,7 @@ var PageHome = function (_React$Component) {
7580
7642
  }, {
7581
7643
  key: 'render',
7582
7644
  value: function render() {
7583
- var _this3 = this;
7645
+ var _this4 = this;
7584
7646
 
7585
7647
  var isReadOnly = false;
7586
7648
  var t = this;
@@ -7624,7 +7686,7 @@ var PageHome = function (_React$Component) {
7624
7686
  title: this.state.titleCommentBackAlert,
7625
7687
  show: this.state.showCommentBackAlert,
7626
7688
  onConfirm: function onConfirm() {
7627
- _this3.setState({ showCommentBackAlert: false });
7689
+ _this4.setState({ showCommentBackAlert: false });
7628
7690
  }
7629
7691
  },
7630
7692
  _react2.default.createElement(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fmui-base",
3
- "version": "2.2.39",
3
+ "version": "2.2.41",
4
4
  "title": "fmui-base",
5
5
  "description": "fmui移动端组件",
6
6
  "main": "lib/index.js",