atr-components 0.2.401 → 0.2.403
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/core/base/atr-common.d.ts +1 -0
- package/core/utils/ToolsUtil.d.ts +8 -4
- package/esm2020/core/base/atr-common.mjs +1 -1
- package/esm2020/core/utils/ToolsUtil.mjs +6 -1
- package/esm2020/lib/shared/form/form.component.mjs +21 -19
- package/fesm2015/atr-components.mjs +25 -18
- package/fesm2015/atr-components.mjs.map +1 -1
- package/fesm2020/atr-components.mjs +25 -18
- package/fesm2020/atr-components.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -407,9 +407,14 @@ class ToolsUtil {
|
|
|
407
407
|
* @param pointsArr
|
|
408
408
|
*/
|
|
409
409
|
static judgeInRec(p, pointsArr) {
|
|
410
|
+
pointsArr = pointsArr.map(item => {
|
|
411
|
+
return { x1: Number(item.x1 || item.x || 0), y1: Number(item.y1 || item.y || 0) };
|
|
412
|
+
});
|
|
413
|
+
p = { x1: p.x1 || p.x || 0, y1: p.y1 || p.y || 0 };
|
|
410
414
|
let px = Number(p.x1), py = Number(p.y1), flag = false, //穿越边框
|
|
411
415
|
inRect = false; //是否在多边形的边或者端点上
|
|
412
416
|
let start = pointsArr[0];
|
|
417
|
+
//如果数组首尾没有相连,手动添加};
|
|
413
418
|
let end = pointsArr[pointsArr.length - 1];
|
|
414
419
|
//如果数组首尾没有相连,手动添加
|
|
415
420
|
pointsArr = start.x1 != end.x1 || start.y1 != end.y1 ? pointsArr.concat(start) : pointsArr;
|
|
@@ -4551,24 +4556,26 @@ class AtrFormComponent {
|
|
|
4551
4556
|
if (item.selectUrl.convert) {
|
|
4552
4557
|
keys = item.selectUrl.convert.split(',');
|
|
4553
4558
|
}
|
|
4554
|
-
|
|
4555
|
-
|
|
4556
|
-
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
value
|
|
4560
|
-
|
|
4561
|
-
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
value
|
|
4569
|
-
|
|
4570
|
-
|
|
4571
|
-
|
|
4559
|
+
if (item.selectUrl.url) {
|
|
4560
|
+
let selectUrl = item.selectUrl;
|
|
4561
|
+
if (selectUrl.host == 'oss') {
|
|
4562
|
+
this.httpService.getOss(selectUrl.url).subscribe(res => {
|
|
4563
|
+
item.dictList = this.conv(JSON.parse(res), keys);
|
|
4564
|
+
if (value && value.length > 0) {
|
|
4565
|
+
value = this.getCascaderDefaultValue(item.dictList, 0, value);
|
|
4566
|
+
this.setValue(item.key, value);
|
|
4567
|
+
}
|
|
4568
|
+
});
|
|
4569
|
+
}
|
|
4570
|
+
else {
|
|
4571
|
+
this.httpService.post(selectUrl.url, {}, ToolsUtil.getHttpOptions()).subscribe(res => {
|
|
4572
|
+
item.dictList = this.conv(res.data, keys);
|
|
4573
|
+
if (value && value.length > 0) {
|
|
4574
|
+
value = this.getCascaderDefaultValue(item.dictList, 0, value);
|
|
4575
|
+
this.setValue(item.key, value);
|
|
4576
|
+
}
|
|
4577
|
+
});
|
|
4578
|
+
}
|
|
4572
4579
|
}
|
|
4573
4580
|
}
|
|
4574
4581
|
if (item.type == "select") {
|