atr-components 0.2.202 → 0.2.204

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.
@@ -4116,13 +4116,25 @@ class AtrFormComponent {
4116
4116
  if (item.selectUrl.convert) {
4117
4117
  keys = item.selectUrl.convert.split(',');
4118
4118
  }
4119
- this.httpService.post(item.selectUrl.url, {}, ToolsUtil.getHttpOptions()).subscribe(res => {
4120
- item.dictList = this.conv(res.data, keys);
4121
- if (value && value.length > 0) {
4122
- value = this.getCascaderDefaultValue(item.dictList, 0, value);
4123
- this.setValue(item.key, value);
4124
- }
4125
- });
4119
+ let selectUrl = item.selectUrl;
4120
+ if (selectUrl.host == 'oss') {
4121
+ this.httpService.getOss(selectUrl).subscribe(res => {
4122
+ item.dictList = this.conv(JSON.parse(res), keys);
4123
+ if (value && value.length > 0) {
4124
+ value = this.getCascaderDefaultValue(item.dictList, 0, value);
4125
+ this.setValue(item.key, value);
4126
+ }
4127
+ });
4128
+ }
4129
+ else {
4130
+ this.httpService.post(selectUrl, {}, ToolsUtil.getHttpOptions()).subscribe(res => {
4131
+ item.dictList = this.conv(res.data, keys);
4132
+ if (value && value.length > 0) {
4133
+ value = this.getCascaderDefaultValue(item.dictList, 0, value);
4134
+ this.setValue(item.key, value);
4135
+ }
4136
+ });
4137
+ }
4126
4138
  }
4127
4139
  if (item.type == "select") {
4128
4140
  this.getDictValue(item.dictCode);