Skip to content

Commit

Permalink
fix isvj-7291, isvj-7511 web打印running回调不应触发 review by songym
Browse files Browse the repository at this point in the history
  • Loading branch information
xilanhuaweidapao committed Jan 23, 2024
1 parent 8e1b237 commit bc3d09f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
15 changes: 6 additions & 9 deletions src/common/iServer/WebPrintingService.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,13 @@ export class WebPrintingService extends CommonServiceBase {

/**
* @function WebPrintingService.prototype.getPrintingJob
* @description 获取 Web 打印输出文档任务。
* @param {string} jobId - Web 打印输入文档任务 ID
* @description 获取 Web 打印输出文档任务, 轮询获取打印状态,只有当状态为完成或失败才返回结果
* @param {string} jobId - Web 打印任务 ID
* @param {RequestCallback} callback - 回调函数。
*/
getPrintingJob(jobId, callback) {
var me = this;
me.processAsync(`jobs/${jobId}`, 'GET', function(result) {
me.rollingProcess(result, me._processUrl(`jobs/${jobId}`), callback);
});
me.rollingProcess(me._processUrl(`jobs/${jobId}`), callback);
}

/**
Expand Down Expand Up @@ -108,11 +106,8 @@ export class WebPrintingService extends CommonServiceBase {
* @description 轮询查询 Web 打印任务。
* @param {Object} result - 服务器返回的结果对象。
*/
rollingProcess(result, url, callback) {
rollingProcess(url, callback) {
var me = this;
if (!result) {
return;
}
this.id && clearInterval(this.id);
this.id = setInterval(function () {
me.request({
Expand Down Expand Up @@ -142,6 +137,8 @@ export class WebPrintingService extends CommonServiceBase {
result = Util.transformResult(result);
if (result.status === 'FINISHED' || result.status === 'ERROR') {
clearInterval(this.id);
} else if (result.status === 'RUNNING') {
options.success = false;
}
return { result, options };
}
Expand Down
2 changes: 1 addition & 1 deletion src/openlayers/mapping/WebMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -3236,7 +3236,7 @@ export class WebMap extends Observable {
}
if (featureType === "LINE") {
colors.push(customSettings[key].strokeColor);
} else {
} else if(customSettings[key].fillColor) {
colors.push(customSettings[key].fillColor);
}
});
Expand Down

0 comments on commit bc3d09f

Please sign in to comment.