## CloudDisk.CalculateModelService()

Fx 构造函数

#### # new CalculateModelService()

DataStore的云盘数据转换服务

作者:
  - 基础平台-潘卓然
See:
  - 该方法强依赖datastore
  - http://192.168.199.53:9011/clouddisk/rest/swagger-ui.html

查看源代码 clouddisk/model/calculate.js, line 16

##### Example

    let service = new CalculateModelService({ domain: "http://192.168.199.53:9011"});
    service.setHeaders({authorization: 'pk.xxxxxx'});
    service.add({nodeId: 100}, (res) => {}, (error) => {});
    service.catalog({nodeId: 100}, (res) => {}, (error) => {});

# 成员变量

#### # serviceUrl

服务地址

查看源代码 clouddisk/model/calculate.js, line 31

# 方法

#### # add(options, onSuccess, onError)

空间数据元数据

##### 参数:

名称 | 类型 | 描述
--- | --- | ---
`options` | Object | 请求参数
`nodeId` | Number | 节点id
`model` | Object | 目地目录
`model.id` | Number |
`model.name` | String |
`model.version` | String |
`model.desp` | String |
`model.img` | String |
`model.modelType` | String |
`model.modelId` | String |
`onSuccess` | function | 成功回调
`onError` | function | 失败回调

查看源代码 clouddisk/model/calculate.js, line 38

##### Example

    http://192.168.199.53:9011/clouddisk/rest/CalculateModel
    {
                "nodeId": 3131,
                "id": 0,
                "name": "string",
                "version": "string",
                "desp": "string",
                "img": "string",
                "modelType": "string",
                "modelId": "string"
            }

#### # catalog(options, onSuccess, onError)

空间数据元数据

##### 参数:

名称 | 类型 | 描述
--- | --- | ---
`options` | Object | 请求参数
`nodeId` | Number | 节点id
`keyword` | String | 检索关键词
`onSuccess` | function | 成功回调
`onError` | function | 失败回调

查看源代码 clouddisk/model/calculate.js, line 73

##### Example

    http://192.168.199.53:9011/clouddisk/rest/CalculateModel/catalog

#### # catalogtype(options, onSuccess, onError)

空间数据元数据

##### 参数:

名称 | 类型 | 描述
--- | --- | ---
`options` | Object | 请求参数
`type` | String | 模型类型eg: igs 、bigdata
`modelID` | String | 模型id
`keyWords` | String | 模型功能类型
`keys` | String | 模型检索关键词
`onSuccess` | function | 成功回调
`onError` | function | 失败回调

查看源代码 clouddisk/model/calculate.js, line 90

##### Example

    http://192.168.199.53:9011/clouddisk/rest/CalculateModel/catalog/{type}

#### # execute(options, onSuccess, onError)

空间数据元数据

##### 参数:

名称 | 类型 | 描述
--- | --- | ---
`options` | Object | 请求参数
`type` | Object | 模型类型
`modelID` | Object | 模型id
`onSuccess` | function | 成功回调
`onError` | function | 失败回调

查看源代码 clouddisk/model/calculate.js, line 113

##### Example

    http://192.168.199.53:9011/clouddisk/rest/CalculateModel/execute/{type}/{modelID}

#### # node(treeNode, onSuccess, onError)

空间数据元数据 Parameter-Content-Type application/json

##### 参数:

名称 | 类型 | 描述
--- | --- | ---
`treeNode` | Object | 请求参数
`onSuccess` | function | 成功回调
`onError` | function | 失败回调

查看源代码 clouddisk/model/calculate.js, line 135

##### Example

    http://192.168.199.53:9011/clouddisk/rest/CalculateModel/node
    {
                "id": 0,
                "name": "string",
                "pid": 0,
                "type": 0,
                "desp": "string",
                "nodeSelected": true,
                "nodeExpand": true,
                "sortId": 0,
                "nodeIco": "string",
                "year": "string",
                "ownerType": 0,
                "ownerId": "string",
                "applicationId": 0,
                "children": [
                    null
                ]
            }

#### # nodeid(options, onSuccess, onError)

空间数据元数据

##### 参数:

名称 | 类型 | 描述
--- | --- | ---
`options` | Object | 请求参数
`id` | String | 节点id
`onSuccess` | function | 成功回调
`onError` | function | 失败回调

查看源代码 clouddisk/model/calculate.js, line 168

##### Example

    http://192.168.199.53:9011/clouddisk/rest/CalculateModel/node/{id}

#### # noderoot(onSuccess, onError)

空间数据元数据

##### 参数:

名称 | 类型 | 描述
--- | --- | ---
`onSuccess` | function | 成功回调
`onError` | function | 失败回调

查看源代码 clouddisk/model/calculate.js, line 185

##### Example

    http://192.168.199.53:9011/clouddisk/rest/CalculateModel/node/root

#### # nodes(onSuccess, onError)

空间数据元数据

##### 参数:

名称 | 类型 | 描述
--- | --- | ---
`onSuccess` | function | 成功回调
`onError` | function | 失败回调

查看源代码 clouddisk/model/calculate.js, line 200

##### Example

    http://192.168.199.53:9011/clouddisk/rest/CalculateModel/nodes

#### # nodesid(options, onSuccess, onError)

空间数据元数据

##### 参数:

名称 | 类型 | 属性 | 默认值 | 描述
--- | --- | --- | --- | ---
`options` | Object |  |  | 请求参数
`nodeId` | String |  |  | 节点id
`subLevel` | Boolean | <optional> | false | 是否包含子级节点
`onSuccess` | function |  |  | 成功回调
`onError` | function |  |  | 失败回调

查看源代码 clouddisk/model/calculate.js, line 215

##### Example

    http://192.168.199.53:9011/clouddisk/rest/CalculateModel/nodes/{nodeId}?subLevel=false