atr-components 0.2.203 → 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.
@@ -4117,15 +4117,24 @@ class AtrFormComponent {
4117
4117
  keys = item.selectUrl.convert.split(',');
4118
4118
  }
4119
4119
  let selectUrl = item.selectUrl;
4120
- let url = selectUrl.host == 'oss' ? (atr_static_datas.OSS_URL + selectUrl.url) : selectUrl.url;
4121
- let options = selectUrl.host == 'oss' ? {} : ToolsUtil.getHttpOptions();
4122
- this.httpService.post(url, {}, options).subscribe(res => {
4123
- item.dictList = this.conv(res.data, keys);
4124
- if (value && value.length > 0) {
4125
- value = this.getCascaderDefaultValue(item.dictList, 0, value);
4126
- this.setValue(item.key, value);
4127
- }
4128
- });
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
+ }
4129
4138
  }
4130
4139
  if (item.type == "select") {
4131
4140
  this.getDictValue(item.dictCode);