Skip to content

Commit 563c2ec

Browse files
committed
2 parents 91d0812 + 699ddad commit 563c2ec

File tree

2 files changed

+12
-19
lines changed

2 files changed

+12
-19
lines changed

examples/component/components_ecologicalBigDataPlatform_vue.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1288,7 +1288,7 @@
12881288
colorGroup: ['#3fb1e3', '#6be6c1', '#626c91', '#a0a7e6', '#c4ebad']
12891289
},
12901290
iframePropDatas: {
1291-
src: 'http://support.supermap.com.cn:8090/webgl/examples/fan.html',
1291+
src: 'http://support.supermap.com.cn:8090/webgl/examples/webgl/fan.html',
12921292
background: 'rgba(0,0,0,0)',
12931293
textColor: '#fff',
12941294
colorGroup: ['#3fb1e3', '#6be6c1', '#626c91', '#a0a7e6', '#c4ebad']

src/common/iServer/GeoprocessingService.js

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,15 @@ export class GeoprocessingService extends CommonServiceBase {
2727
* @description 获取地理处理工具列表。
2828
*/
2929
getTools() {
30-
const url = `${this.url}/list`;
31-
this._get(url);
30+
this._get(`${this.url}/list`);
3231
}
3332
/**
3433
* @function SuperMap.GeoprocessingService.prototype.getTool
3534
* @description 获取地理处理工具的ID、名称、描述、输入参数、环境参数和输出结果等相关参数。
3635
* @param {string} identifier - 地理处理工具ID。
3736
*/
3837
getTool(identifier) {
39-
const url = `${this.url}/${identifier}`;
40-
this._get(url);
38+
this._get(`${this.url}/${identifier}`);
4139
}
4240
/**
4341
* @function SuperMap.GeoprocessingService.prototype.execute
@@ -49,9 +47,8 @@ export class GeoprocessingService extends CommonServiceBase {
4947
execute(identifier, parameter, environment) {
5048
parameter = parameter ? parameter : null;
5149
environment = environment ? environment : null;
52-
const paramter = { parameter, environment };
53-
const url = `${this.url}/${identifier}/execute`;
54-
this._get(url, paramter);
50+
const executeParamter = { parameter, environment };
51+
this._get(`${this.url}/${identifier}/execute`, executeParamter);
5552
}
5653
/**
5754
* @function SuperMap.GeoprocessingService.prototype.submitJob
@@ -63,13 +60,12 @@ export class GeoprocessingService extends CommonServiceBase {
6360
submitJob(identifier, parameter, environments) {
6461
parameter = parameter ? parameter : null;
6562
environments = environments ? environments : null;
66-
const asyncParameter = { parameter: parameter, environments: environments };
67-
const url = `${this.url}/${identifier}/jobs`;
63+
const asyncParamter = { parameter: parameter, environments: environments };
6864
this.request({
69-
url: url,
65+
url: `${this.url}/${identifier}/jobs`,
7066
headers: { 'Content-type': 'application/json' },
7167
method: 'POST',
72-
data: JSON.stringify(asyncParameter),
68+
data: JSON.stringify(asyncParamter),
7369
scope: this,
7470
success: this.serviceProcessCompleted,
7571
failure: this.serviceProcessFailed
@@ -87,7 +83,6 @@ export class GeoprocessingService extends CommonServiceBase {
8783
*/
8884
waitForJobCompletion(jobId, identifier, options) {
8985
const me = this;
90-
const url = `${me.url}/${identifier}/jobs/${jobId}`;
9186
const timer = setInterval(function () {
9287
const serviceProcessCompleted = function (serverResult) {
9388
const state = serverResult.state.runState;
@@ -107,15 +102,15 @@ export class GeoprocessingService extends CommonServiceBase {
107102
result: serverResult
108103
});
109104
break;
110-
case 'CANCEL':
105+
case 'CANCELED':
111106
clearInterval(timer);
112107
me.events.triggerEvent('processFailed', {
113108
result: serverResult
114109
});
115110
break;
116111
}
117112
};
118-
me._get(url, null, serviceProcessCompleted);
113+
me._get(`${me.url}/${identifier}/jobs/${jobId}`, null, serviceProcessCompleted);
119114
}, options.interval);
120115
}
121116

@@ -126,8 +121,7 @@ export class GeoprocessingService extends CommonServiceBase {
126121
* @param {string} jobId - 地理处理任务ID。
127122
*/
128123
getJobInfo(identifier, jobId) {
129-
const url = `${this.url}/${identifier}/jobs/${jobId}`;
130-
this._get(url);
124+
this._get(`${this.url}/${identifier}/jobs/${jobId}`);
131125
}
132126

133127
/**
@@ -137,8 +131,7 @@ export class GeoprocessingService extends CommonServiceBase {
137131
* @param {string} jobId - 地理处理任务ID。
138132
*/
139133
cancelJob(identifier, jobId) {
140-
const url = `${this.url}/${identifier}/jobs/${jobId}/cancel`;
141-
this._get(url);
134+
this._get(`${this.url}/${identifier}/jobs/${jobId}/cancel`);
142135
}
143136
/**
144137
* @function SuperMap.GeoprocessingService.prototype.getJobs

0 commit comments

Comments
 (0)