@steedos-widgets/amis-lib 1.1.1 → 1.1.2

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.umd.js CHANGED
@@ -1501,8 +1501,8 @@
1501
1501
  /*
1502
1502
  * @Author: baozhoutao@steedos.com
1503
1503
  * @Date: 2022-11-01 15:49:58
1504
- * @LastEditors: baozhoutao@steedos.com
1505
- * @LastEditTime: 2022-11-08 16:39:40
1504
+ * @LastEditors: 殷亮辉 yinlianghui@hotoa.com
1505
+ * @LastEditTime: 2023-03-25 17:22:00
1506
1506
  * @Description:
1507
1507
  */
1508
1508
 
@@ -1546,6 +1546,10 @@
1546
1546
  actionType: "dialog",
1547
1547
  dialog: {
1548
1548
  type: "dialog",
1549
+ "data": {
1550
+ "&": "$$",
1551
+ "$master": "$$"
1552
+ },
1549
1553
  title: title,
1550
1554
  bodyClassName: "",
1551
1555
  body: [formSchema],
@@ -1568,6 +1572,12 @@
1568
1572
  };
1569
1573
  };
1570
1574
 
1575
+ /*
1576
+ * @Author: 殷亮辉 yinlianghui@hotoa.com
1577
+ * @Date: 2023-03-22 09:31:21
1578
+ * @LastEditors: 殷亮辉 yinlianghui@hotoa.com
1579
+ * @LastEditTime: 2023-03-25 22:41:27
1580
+ */
1571
1581
  const getSchema$2 = (uiSchema)=>{
1572
1582
  return {
1573
1583
  "type": "service",
@@ -1618,6 +1628,16 @@
1618
1628
  "objectName": `${uiSchema.name}`,
1619
1629
  "__deletedRecord": true
1620
1630
  }
1631
+ },
1632
+ {
1633
+ "actionType": "broadcast",
1634
+ "args": {
1635
+ "eventName": "@data.changed.${masterObjectName}"
1636
+ },
1637
+ "data": {
1638
+ "objectName": "${masterObjectName}"
1639
+ },
1640
+ "expression": "${masterObjectName}"
1621
1641
  }
1622
1642
  ]
1623
1643
  }
@@ -3967,9 +3987,13 @@ filterService.setData({showFieldsFilter: !!!filterService.props.data.showFieldsF
3967
3987
  `;
3968
3988
  source.adaptor = `
3969
3989
  const enable_tree = ${refObjectConfig.enable_tree};
3970
- const value = api.data.$self.value;
3971
- if(!_.isEmpty(value)){
3972
- // value 不为空值,表示返回当前选中节点信息
3990
+ const op = api.data.$self.op;
3991
+ if(!_.isEmpty(op)){
3992
+ // op不为空,表示处于字段初始编辑状态,不是点击后出现弹窗状态。
3993
+ const rows = _.map(payload.data.rows, (item)=>{
3994
+ return _.pick(item, ["${referenceTo.labelField.name}", "${referenceTo.valueField.name}"]);
3995
+ })
3996
+ payload.data.rows = rows;
3973
3997
  return payload;
3974
3998
  }
3975
3999
  if(enable_tree){
@@ -5848,6 +5872,16 @@ filterService.setData({showFieldsFilter: !!!filterService.props.data.showFieldsF
5848
5872
  "data": {
5849
5873
  "objectName": `${objectSchema.name}`
5850
5874
  }
5875
+ },
5876
+ {
5877
+ "actionType": "broadcast",
5878
+ "args": {
5879
+ "eventName": "@data.changed.${$master.masterObjectName}"
5880
+ },
5881
+ "data": {
5882
+ "objectName": "${$master.masterObjectName}"
5883
+ },
5884
+ "expression": "${$master.masterObjectName}"
5851
5885
  }
5852
5886
  ]
5853
5887
  }