Skip to content

Commit 0605761

Browse files
author
潘卓然ParnDeedlit
committed
【SDK】【服务】【新增云盘的文件服务】
1 parent 927651c commit 0605761

File tree

2 files changed

+91
-18
lines changed

2 files changed

+91
-18
lines changed

README.md

Lines changed: 39 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,25 @@ MapGIS Client for JavaScript:是增强的MapGIS Web开发平台,集成Openla
1212

1313
## 目录
1414

15-
- [一、开始](#目录)
16-
- [1、司马云](#1、司马云)
17-
- [2、GitHub](#2、GitHub)
18-
- [3、特性](#3、特性)
19-
- [4、示例](#4、示例)
20-
- [二、深入了解](#二、深入了解)
21-
- [1、代码结构](#1、代码结构)
22-
- [2、编译](#2、编译)
23-
- [3、问题](#3、问题)
24-
- [4、依赖](#4、依赖)
25-
- [三、资源](#三、资源)
26-
- [1、在线资源](#1、在线资源)
27-
- [2、在线服务](#2、在线服务)
28-
- [四、团队](#四、团队)
29-
- [五、证书](#五、证书)
15+
- [MapGIS Client for JavaScript](#mapgis-client-for-javascript)
16+
- [目录](#目录)
17+
- [一、开始](#一开始)
18+
- [1、司马云](#1司马云)
19+
- [2、GitHub](#2github)
20+
- [3、特性](#3特性)
21+
- [4、示例](#4示例)
22+
- [二、深入了解](#二深入了解)
23+
- [1、代码结构](#1代码结构)
24+
- [2、运行示例网站](#2运行示例网站)
25+
- [3、编译](#3编译)
26+
- [3、问题](#3问题)
27+
- [4、依赖](#4依赖)
28+
- [三、资源](#三资源)
29+
- [Npm](#npm)
30+
- [1、在线资源](#1在线资源)
31+
- [2、在线服务](#2在线服务)
32+
- [四、团队](#四团队)
33+
- [五、证书](#五证书)
3034

3135
## 一、开始
3236

@@ -41,9 +45,9 @@ MapGIS Client for JavaScript:是增强的MapGIS Web开发平台,集成Openla
4145
3. 更多详情请查看司马云 www.smaryun.com
4246

4347
### 3、特性
44-
|四大地图引擎|融合热门前端可视化技术|多样化开发方式|
45-
|:---|:---|:---|
46-
|<img alt="MapGIS" src="website/public/static/assets/bane/sub11.png">|<img alt="MapGIS" src="website/public/static/assets/bane/sub22.png">|<img alt="MapGIS" src="website/public/static/assets/bane/sub33.png">|
48+
| 四大地图引擎 | 融合热门前端可视化技术 | 多样化开发方式 |
49+
| :------------------------------------------------------------------- | :------------------------------------------------------------------- | :------------------------------------------------------------------- |
50+
| <img alt="MapGIS" src="website/public/static/assets/bane/sub11.png"> | <img alt="MapGIS" src="website/public/static/assets/bane/sub22.png"> | <img alt="MapGIS" src="website/public/static/assets/bane/sub33.png"> |
4751

4852
### 4、示例
4953
<p align="center">
@@ -177,6 +181,23 @@ MapGIS Client for JavaScript:是增强的MapGIS Web开发平台,集成Openla
177181

178182
## 三、资源
179183

184+
### Npm
185+
1. 原始地图引擎 (npm上直接获取)
186+
1. @mapgis/cesium
187+
1. @mapgis/mapbox-gl
188+
1. leaflet 1.7.0+
189+
1. ol 5+ 暂不支持6的版本
190+
2. MapGIS拓展插件 (npm上无法直接获取)
191+
1. webclient-cesium-plugin (内置了webclient-es6-service)
192+
2. webclient-mapboxgl-plugin (内置了webclient-es6-service)
193+
3. webclient-leaflet-plugin (内置了webclient-es6-service)
194+
4. webclient-openlayers-plugin (内置了webclient-es6-service)
195+
5. webclient-es6-service (针对纯RestfulAPI,不带地图视图)
196+
3. Vue组件 (npm上直接获取)
197+
1. @mapgis/webclient-vue-cesium
198+
2. @mapgis/webclient-vue-mapboxgl
199+
3. @mapgis/webclient-es6-service
200+
180201
### 1、在线资源
181202
[资源中心-云开发世界](http://www.smaryun.com/dev/resource_center.html#/type27/tag184/page1)
182203

src/service/clouddisk/file/file.js

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
import { Zondy } from '../../common/Base';
2+
import { CloudDiskService } from '../ServiceBase';
3+
4+
const CopyPath = 'copy';
5+
6+
/**
7+
* @class module:CloudDisk.GisCore.FileService
8+
* @description DataStore的云盘数据转换服务
9+
* @see 该方法强依赖datastore
10+
* @author 基础平台-潘卓然
11+
*/
12+
export class FileService extends CloudDiskService {
13+
constructor(options) {
14+
super(options);
15+
/**
16+
* @member module:CloudDisk.FileService.prototype.serviceUrl
17+
* @description 服务地址
18+
*/
19+
this.serviceUrl = '/clouddisk/rest/file/';
20+
}
21+
22+
/**
23+
* @private 修正get/post需要的真正参数
24+
*/
25+
fixOption(option) {
26+
this.option = {
27+
};
28+
}
29+
30+
/**
31+
* @function module:CloudDisk.FileService.prototype.schema
32+
* @description 空间数据元数据
33+
* @param {Object} options 请求参数
34+
* @param {String} options.destFileName
35+
* @param {String} options.destFolderDir
36+
* @param {String} options.isFolder
37+
* @param {String} options.srcUrl
38+
* @param {Function} onSuccess 成功回调
39+
* @param {Function} onError 失败回调
40+
* @link http://192.168.199.53:9011/giscore/dataconvert/rest/geodataset/schema?
41+
*/
42+
copy(options, onSuccess, onError) {
43+
let { serviceUrl } = this;
44+
serviceUrl += CopyPath;
45+
let url = this.getFullUrl(serviceUrl, options);
46+
this.get(url, onSuccess, onError);
47+
}
48+
49+
}
50+
51+
export default FileService;
52+
Zondy.CloudDisk.GisCore.FileService = FileService;

0 commit comments

Comments
 (0)