Class: WorkFlowServer600371

WorkFlowServer600371

new WorkFlowServer600371(options)

service/igs/workflow/WorkFlowServer600371.js, line 2

三维体叠加分析

Name Type Description
options Object

构造参数

Name Type Description
url String 可选

工作流基地址,必传

srcClsA String 可选

源简单要素类A的URL,必传,例如 GDBP://mapgislocal/Sample/sfcls/overLayA

srcOidListA String 可选

源简单要素类AOID(不填:全图叠加),英文逗号分割,例如 1,2,3

srcClsB String 可选

源简单要素类B,必传,例如 GDBP://mapgislocal/Sample/sfcls/overLayB

srcOidListB String 可选

源简单要素类BOID(不填:全图叠加),英文逗号分割,例如 1,2,3

desCls String 可选

结果简单要素类的URL,必传,例如 GDBP://mapgislocal/Sample/sfcls/overLayDes

operateType Number 可选

叠加类型(0:交; 1:差),必传, 求交:即求两个数据集的交集的操作,两个数据集中相交的部分被保存到结果数据集中,其余部分被排除;求差:从输入图层(图层A)中去掉与叠加图层(图层B)相重叠的部分。,例如 {"0":"交","1":"差"}

attOperateType Number 可选

属性操作(0:不处理属性;1:处理属性),必传, 例如 {"0":"不处理属性","1":"处理属性"}

multiOperate Number 可选

复合要素操作,0:不处理复合要素;1:处理复合要素,必传,例如 {"0":"不处理复合要素","1":"处理复合要素"}

tolerance Number 可选

容差,例如 0.001

Example
// ES5引入方式
const { WorkFlowServer } = zondy.server
const { FetchMethod } = zondy.enum
// ES6引入方式
import { WorkFlowServer, FetchMethod } from "@mapgis/webclient-common"

  const workFlowServer600371 = WorkFlowServer.createWorkFlow({
    url: "http://localhost:8089/igs/rest/services/workflow/600371/WorkflowServer",
    srcClsA:
      "gdbp://MapGisLocal/武汉市/sfcls/populationSizeGeoJson_2017.json_Reg",
    srcClsB: "gdbp://MapGISLocalPlus/湖北省/ds/epsg4214/sfcls/湖北省_4214",
    desCls: "gdbp://MapGisLocal/武汉市/sfcls/叠加结果1",
    operateType: 0,
    attOperateType: 0,
    multiOperate: 0,
  });
  workFlowServer600371.execute({
    success: function (res) {
      console.log("execute: ", res);
    },
  });

Extends

Members

attOperateTypeNumber

属性操作(0:不处理属性;1:处理属性),必传,例如 {"0":"不处理属性","1":"处理属性"}

clientIdBoolean

客户端id

desClsString

结果简单要素类的URL,必传,例如 GDBP://mapgislocal/Sample/sfcls/overLayDes

descriptionString

三维体叠加分析

enableGlobeFetchBoolean

是否使用确据唯一的fetch对象,默认为true,当设为false时,会使用自己私有的fetch对象,所有的请求设置不会影响全局

Example
//设置请求基地址
// ES5引入方式
const { BaseServer } = zondy.service
// ES6引入方式
import { BaseServer } from "@mapgis/webclient-common"
let BaseServer = new BaseServer({
  //请求基地址
  url: '你的URL',
  //使用私有的fetch对象
  enableGlobeFetch: false,
  //此时设置token等属性,不会影响全局的fetch对象
  tokenValue: '你的token'
});
//继续使用全局fetch
BaseServer.enableGlobeFetch = true;

flowIdNumber

600371

groupNameString

叠加分析

headersString

请求头参数

Example
//设置请求头参数
// ES5引入方式
const { BaseServer } = zondy.service
// ES6引入方式
import { BaseServer } from "@mapgis/webclient-common"
let BaseServer = new BaseServer({
  //请求头
  headers: {
     //设置Content-Type为multipart/form-data
    'Content-Type': 'multipart/form-data',
     //设置token
    'token': '你的token'
  }
});
//动态修改
BaseServer.headers.token = '新token';

multiOperateNumber

复合要素操作,0:不处理复合要素;1:处理复合要素,必传,例如 {"0":"不处理复合要素","1":"处理复合要素"}

operateTypeNumber

叠加类型(0:交; 1:差),必传,求交:即求两个数据集的交集的操作,两个数据集中相交的部分被保存到结果数据集中,其余部分被排除;求差:从输入图层(图层A)中去掉与叠加图层(图层B)相重叠的部分。,例如 {"0":"交","1":"差"}

requestInterceptorfunction

请求发送拦截器

Example
//设置拦截器,任何一个继承自BaseServer的对象都可以设置,全局唯一
// ES5引入方式
const { BaseServer,RequestInterceptor } = zondy.service
// ES6引入方式
import { BaseServer,RequestInterceptor } from "@mapgis/webclient-common"
let BaseServer = new BaseServer({
  //设置请求发送拦截器
  requestInterceptor: new RequestInterceptor({
    //请求发送前进行统一处理
    before: function(config) {
      //执行你的业务逻辑
      //注意必须显示返回config对象,如果返回为空,则不发送请求
      return config;
    },
    //请求发送失败时进行统一处理
    failure: function(error) {
      //执行你的业务逻辑
    }
  })
});
//动态修改
BaseServer.requestInterceptor.before = function() {};

requestTimeoutString

请求超时时间,默认45000ms,即45s

Example
//设置超时时间
//初始化AddressServer服务对象
// ES5引入方式
const { BaseServer } = zondy.service
// ES6引入方式
import { BaseServer } from "@mapgis/webclient-common"
let BaseServer = new BaseServer({
  //超时时间
  requestTimeout: 2000
});
//动态修改
BaseServer.requestTimeout = 3000;

responseInterceptorfunction

请求响应拦截器

Example
//设置拦截器,任何一个继承自BaseServer的对象都可以设置,全局唯一
// ES5引入方式
const { BaseServer,ResponseInterceptor } = zondy.service
// ES6引入方式
import { BaseServer,ResponseInterceptor } from "@mapgis/webclient-common"
let BaseServer = new BaseServer({
  //设置请求响应拦截器
  responseInterceptor: new ResponseInterceptor({
    //执行请求响应,接口调用成功时会执行的回调
    success: function(result) {
      //执行你的业务逻辑
      //注意必须显示返回result对象,如果返回为空,则不执行请求响应成功回调
      return result;
    },
    //请求响应成功,接口调用失败时会执行的函数
    failure: function(result) {
      //执行你的业务逻辑
      //注意必须显示返回result对象,如果返回为空,则不执行回调韩式
      return result;
    }
  })
});
//动态修改
BaseServer.responseInterceptor.success = function() {};

srcClsAString

源简单要素类A的URL,必传,例如 GDBP://mapgislocal/Sample/sfcls/overLayA

srcClsBString

源简单要素类B,必传,例如 GDBP://mapgislocal/Sample/sfcls/overLayB

srcOidListAString

源简单要素类AOID(不填:全图叠加),英文逗号分割,例如 1,2,3

srcOidListBString

源简单要素类BOID(不填:全图叠加),英文逗号分割,例如 1,2,3

tokenAttachTypeTokenAttachType

指定token附加到何处

Example
//设置token值
// ES5引入方式
const { BaseServer } = zondy.service
const { TokenAttachType } = zondy.enum
// ES6引入方式
import { BaseServer,TokenAttachType } from "@mapgis/webclient-common"
let BaseServer = new BaseServer({
  //token名
  tokenKey: '你的token key',
  //token值
  tokenValue: '你的token值',
  //指定token附加到url后面
  tokenAttachType: TokenAttachType.url
});
//动态修改
BaseServer.tokenAttachType = TokenAttachType.header;

tokenKeyString

token名

Example
//设置token名
// ES5引入方式
const { BaseServer } = zondy.service
// ES6引入方式
import { BaseServer } from "@mapgis/webclient-common"
let BaseServer = new BaseServer({
  //token名
  tokenKey: '你的tokenKey'
});
//动态修改
BaseServer.tokenKey = '新tokenKey';

tokenValueString

token值

Example
//设置token值
// ES5引入方式
const { BaseServer } = zondy.service
// ES6引入方式
import { BaseServer } from "@mapgis/webclient-common"
let BaseServer = new BaseServer({
  //token值
  tokenValue: '你的token值'
});
//动态修改
BaseServer.tokenValue = '新token值';

toleranceNumber

容差,例如 0.001

urlString

工作流基地址,必传

Methods

inherited execute(options){Promise.<Object>}

service/igs/workflow/WorkFlowServer.js, line 179

同步执行工作流,返回执行结果

Name Type Description
options Object
Name Type Default Description
headers String 可选

请求头参数

method String FetchMethod.get 可选

请求类型

success function 可选

查询成功回调函数,若使用Promise方式则不必填写

failure function 可选

查询失败回调函数,若使用Promise方式则不必填写

Returns:
Type Description
Promise.<Object>
Example
workflow.execute({
      method: zondy.enum.FetchMethod.get,
      success: function (res) {
        console.log("execute: ", res);
      },
    });

inherited queryServerInfo(options)

service/BaseServer.js, line 151

获取服务信息,IGS2.0新增服务

Name Type Description
options

查询参数

Name Type Default Description
success function 可选

查询成功回调函数,若使用Promise方式则不必填写

failure function 可选

查询失败回调函数,若使用Promise方式则不必填写

Examples

获取服务信息-回调方式

server.queryServerInfo({
  success: function (result) {
    console.log('请求成功:', result);
  },
  failure: function (result) {
    console.log('请求失败:', result);
  }
});

获取服务信息-promise方式

server.queryServerInfo({
})
.then(function (result) {
  console.log('请求成功:', result);
}).catch(function (result) {
  console.log('请求失败:', result);
});

inherited queryTaskResult(options){Promise.<String>}

service/igs/workflow/WorkFlowServer.js, line 297

查询工作流执行结果

Name Type Description
options Object
Name Type Default Description
taskId String 可选

工作流任务id,必传

headers String 可选

请求头参数

method String FetchMethod.get 可选

请求类型

success function 可选

查询成功回调函数,若使用Promise方式则不必填写

failure function 可选

查询失败回调函数,若使用Promise方式则不必填写

Returns:
Type Description
Promise.<String>
Example
workflow.queryTaskResult({
      taskId: taskId,
      success: function (res) {
        console.log("success: ", res);
      },
    });

inherited queryTaskStatus(options){Promise.<String>}

service/igs/workflow/WorkFlowServer.js, line 257

查询工作流执行状态

Name Type Description
options Object
Name Type Default Description
taskId String 可选

工作流任务id,必传

headers String 可选

请求头参数

method String FetchMethod.get 可选

请求类型

success function 可选

查询成功回调函数,若使用Promise方式则不必填写

failure function 可选

查询失败回调函数,若使用Promise方式则不必填写

Returns:
Type Description
Promise.<String>
Example
workflow.queryTaskStatus({
      taskId: taskId,
      success: function (res) {
        console.log("success: ", res);
      },
    });

inherited submit(options){Promise.<String>}

service/igs/workflow/WorkFlowServer.js, line 217

异步执行工作流,返回执行任务id

Name Type Description
options Object
Name Type Default Description
headers String 可选

请求头参数

method String FetchMethod.get 可选

请求类型

success function 可选

查询成功回调函数,若使用Promise方式则不必填写

failure function 可选

查询失败回调函数,若使用Promise方式则不必填写

Returns:
Type Description
Promise.<String> workflow.submit({ method: zondy.enum.FetchMethod.get, success: function (res) { console.log("submit: ", res); }, });