类名 common/service/igs/workflow/WorkFlowServer600354.js
import WorkFlowServer from './WorkFlowServer'

import { defaultValue } from '../../../util'
/**
 * 最近设施分析
 * @class WorkFlowServer600354
 *
 * @extends WorkFlowServer
 * @param {Object} options 构造参数
 * @param {String} [options.url] 工作流基地址,必传
 * @param {String} [options.netClsUrl] 网络类的URL,必传,例如:gdbp://MapGisLocal/sample/ds/网络分析/ncls/道路交通网
 * @param {String} [options.facilityPosStr] 设施点坐标字符串,逗号分隔,形如:x1,y1,x2,y2,必传,例如:114.492507198986,38.0604768248643,114.49193,38.057552
 * @param {String} [options.eventPosStr] 事件点坐标字符串,逗号分隔,形如:x1,y1,x2,y2,必传,例如:114.4988,38.055849,114.498885,38.0525305
 * @param {Number} [options.elementType] 添加网标方式,例如:2
 * @param {String} [options.barrierPosStr] 障碍点坐标字符串,逗号分隔,形如:x1,y1,x2,y2,例如:114.4988,38.055849,114.498885,38.0525305
 * @param {Number} [options.nearDis] 容差,必传,例如:0.001
 * @param {String} [options.direction] 方向,默认从设施,例如:{"从设施":"从设施","到设施":"到设施"}
 * @param {String} [options.outFormat] 输出格式,默认JSON,必传,例如:{"JSON":"JSON", "XML":"XML"}
 * @example
    const workFlowServer600354 = WorkFlowServer.createWorkFlow({
        url: "http://localhost:8089/igs/rest/services/workflow/600354/WorkflowServer",
        netClsUrl: "gdbp://MapGISLocalPlus/sample/ds/网络分析/ncls/道路交通网",
        facilityPosStr: "114.492507198986,38.0604768248643,114.49193,38.057552",
        eventPosStr: "114.4988,38.055849,114.498885,38.0525305",
        elementType: 2,
        barrierPosStr: "114.4988,38.055849,114.498885,38.0525305",
        nearDis: 0.01,
        outFormat: "JSON",
    });
    workFlowServer600354.execute({
        method: Zondy.Enum.FetchMethod.get,
        success: function (res) {
            console.log("execute: ", res);
        },
    });
 */
class WorkFlowServer600354 extends WorkFlowServer {
  constructor(options) {
    super(options)
    const opt = options || {}
    /**
     * @description 工作流基地址,必传
     * @member {String} WorkFlowServer600354.prototype.url
     * */
    this.url = opt.url
    /**
     * @description 600354
     * @member {Number} WorkFlowServer600354.prototype.flowId
     * @readonly
     * */
    this.flowId = 600354
    /**
     * @description 最近设施分析
     * @member {String} WorkFlowServer600354.prototype.description
     * @readonly
     * */
    this.description = '最近设施分析'
    /**
     * @description 网络分析
     * @member {String} WorkFlowServer600354.prototype.groupName
     * @readonly
     * */
    this.groupName = '网络分析'
    /**
     * @description 网络类的URL,必传,例如:gdbp://MapGisLocal/sample/ds/网络分析/ncls/道路交通网
     * @member {String} WorkFlowServer600354.prototype.netClsUrl
     * */
    this.netClsUrl = opt.netClsUrl
    /**
     * @description 设施点坐标字符串,逗号分隔,形如:x1,y1,x2,y2,必传,例如:114.492507198986,38.0604768248643,114.49193,38.057552
     * @member {String} WorkFlowServer600354.prototype.facilityPosStr
     * */
    this.facilityPosStr = opt.facilityPosStr
    /**
     * @description 事件点坐标字符串,逗号分隔,形如:x1,y1,x2,y2,必传,例如:114.4988,38.055849,114.498885,38.0525305
     * @member {String} WorkFlowServer600354.prototype.eventPosStr
     * */
    this.eventPosStr = opt.eventPosStr
    /**
     * @description 添加网标方式,逗号分隔,必传,例如:1,2
     * @member {Number} WorkFlowServer600354.prototype.elementType
     * */
    this.elementType = opt.elementType
    /**
     * @description 障碍点坐标字符串,逗号分隔,形如:x1,y1,x2,y2,例如:114.4988,38.055849,114.498885,38.0525305
     * @member {String} WorkFlowServer600354.prototype.barrierPosStr
     * */
    this.barrierPosStr = defaultValue(opt.barrierPosStr, '')
    /**
     * @description 容差,必传,例如:0.001
     * @member {Number} WorkFlowServer600354.prototype.nearDis
     * */
    this.nearDis = opt.nearDis
    /**
     * @description 方向,默认从设施,例如:{"从设施":"从设施","到设施":"到设施"}
     * @member {String} WorkFlowServer600354.prototype.direction
     * */
    this.direction = defaultValue(opt.direction, '从设施')
    /**
     * @description 输出格式,默认JSON,必传,例如:{"JSON":"JSON", "XML":"XML"}
     * @member {String} WorkFlowServer600354.prototype.outFormat
     * */
    this.outFormat = opt.outFormat
  }

  /**
   * @description 获取执行工作流check对象
   * @private
   * @return {Object}
   */
  _getCheckQueryOpts() {
    return {
      netClsUrl: {
        required: true,
        type: 'String'
      },
      facilityPosStr: {
        required: true,
        type: 'String'
      },
      eventPosStr: {
        required: true,
        type: 'String'
      },
      elementType: {
        required: true,
        type: 'Number'
      },
      barrierPosStr: {
        type: 'String'
      },
      nearDis: {
        required: true,
        type: 'Number'
      },
      direction: {
        type: 'String'
      },
      outFormat: {
        required: true,
        type: 'String'
      }
    }
  }
}

export default WorkFlowServer600354
构造函数
成员变量
方法
事件