Skip to content

Commit 4ebeb1e

Browse files
author
杜美瑶
committed
打包iportal删除更改API封装的文件 --reviewed by huangqh
1 parent 952f24c commit 4ebeb1e

13 files changed

+4387
-3021
lines changed

dist/classic/iclient-classic.min.js

Lines changed: 99 additions & 55 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/leaflet/iclient-leaflet-es6.js

Lines changed: 45 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16258,6 +16258,7 @@ class iPortalResource_IPortalResource extends iPortalServiceBase_IPortalServiceB
1625816258
this.thumbnail = null;
1625916259
this.updateTime = 0;
1626016260
this.userName = "";
16261+
this.sourceJSON = {};//返回门户资源详细信息
1626116262
Util.extend(this, resourceInfo); // INSIGHTS_WORKSPACE MAP_DASHBOARD
1626216263
this.resourceUrl = portalUrl + "/web/"+this.resourceType.replace("_","").toLowerCase()+"s/" + this.resourceId;
1626316264
if (this.withCredentials) {
@@ -16280,38 +16281,20 @@ class iPortalResource_IPortalResource extends iPortalServiceBase_IPortalServiceB
1628016281
if (resourceInfo.error) {
1628116282
return resourceInfo;
1628216283
}
16283-
for (var key in resourceInfo) {
16284-
me[key] = resourceInfo[key];
16285-
}
16284+
me.sourceJSON = resourceInfo;
1628616285
});
1628716286
}
1628816287

1628916288
/**
1629016289
* @function SuperMap.IPortalResource.prototype.update
16291-
* @description 更新地图参数
16290+
* @description 更新资源属性信息
1629216291
* @returns {Promise} 返回包含更新操作状态的 Promise 对象。
1629316292
*/
1629416293
update() {
16295-
var resourceUpdateParam = {
16296-
units: this.units,
16297-
level: this.level,
16298-
center: this.center,
16299-
controls: this.controls,
16300-
description: this.description,
16301-
epsgCode: this.epsgCode,
16302-
extent: this.extent,
16303-
status: this.status,
16304-
tags: this.tags,
16305-
layers: this.layers,
16306-
title: this.title,
16307-
thumbnail: this.thumbnail,
16308-
sourceType: this.sourceType,
16309-
authorizeSetting: this.authorizeSetting
16310-
};
1631116294
var options = {
1631216295
headers: {'Content-Type': 'application/x-www-form-urlencoded'}
1631316296
};
16314-
return this.request("PUT", this.resourceUrl, JSON.stringify(resourceUpdateParam), options);
16297+
return this.request("PUT", this.resourceUrl, JSON.stringify(this.sourceJSON), options);
1631516298
}
1631616299

1631716300
}
@@ -16762,6 +16745,44 @@ class iPortalShareEntity_IPortalShareEntity {
1676216745
SuperMap.iPortalShareEntity = iPortalShareEntity_IPortalShareEntity;
1676316746

1676416747

16748+
// CONCATENATED MODULE: ./src/common/iPortal/iPortalUser.js
16749+
/* Copyright© 2000 - 2019 SuperMap Software Co.Ltd. All rights reserved.
16750+
* This program are made available under the terms of the Apache License, Version 2.0
16751+
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
16752+
16753+
16754+
/**
16755+
* @class SuperMap.IPortalUser
16756+
* @classdesc iPortal 门户中用户信息的封装类。用于管理用户资源,包括可删除,添加资源。
16757+
* @category iPortal/Online
16758+
* @param {string} iportalUrl - iportal根地址。
16759+
* @extends {SuperMap.iPortalServiceBase}
16760+
*
16761+
*/
16762+
class iPortalUser_IPortalUser extends iPortalServiceBase_IPortalServiceBase {
16763+
constructor(iportalUrl) {
16764+
super(iportalUrl);
16765+
this.iportalUrl = iportalUrl;
16766+
}
16767+
16768+
/**
16769+
* @function SuperMap.prototype.deleteResources
16770+
* @description 删除资源。
16771+
* @param {Object} deleteParams - 删除资源所需的参数对象:{ids,resourceType}。
16772+
* @returns {Promise} 返回包含删除操作状态的 Promise 对象。
16773+
*/
16774+
deleteResources(deleteParams) {
16775+
var resourceName = deleteParams.resourceType.replace("_","").toLowerCase();
16776+
var deleteResourceUrl = this.iportalUrl+"/web/" + resourceName +"s.json?ids=" + encodeURI(JSON.stringify(deleteParams.ids));
16777+
if( resourceName === 'data') {
16778+
deleteResourceUrl = this.iportalUrl + "/web/mycontent/datas/delete.json";
16779+
return this.request("POST", deleteResourceUrl, JSON.stringify(deleteParams.ids));
16780+
}
16781+
return this.request("DELETE", deleteResourceUrl);
16782+
}
16783+
}
16784+
16785+
SuperMap.iPortalUser = iPortalUser_IPortalUser;
1676516786
// CONCATENATED MODULE: ./src/common/iPortal/index.js
1676616787
/* Copyright© 2000 - 2019 SuperMap Software Co.Ltd. All rights reserved.
1676716788
* This program are made available under the terms of the Apache License, Version 2.0
@@ -16798,6 +16819,8 @@ SuperMap.iPortalShareEntity = iPortalShareEntity_IPortalShareEntity;
1679816819

1679916820

1680016821

16822+
16823+
1680116824

1680216825

1680316826

@@ -97271,6 +97294,7 @@ external_L_default.a.supermap.components.dataServiceQuery = dataServiceQueryView
9727197294
/* concated harmony reexport IPortalServicesQueryParam */__webpack_require__.d(__webpack_exports__, "IPortalServicesQueryParam", function() { return iPortalServicesQueryParam_IPortalServicesQueryParam; });
9727297295
/* concated harmony reexport IPortalMapdashboard */__webpack_require__.d(__webpack_exports__, "IPortalMapdashboard", function() { return iPortalMapdashboard_IPortalMapdashboard; });
9727397296
/* concated harmony reexport IPortalMapdashboardsQueryParam */__webpack_require__.d(__webpack_exports__, "IPortalMapdashboardsQueryParam", function() { return iPortalMapdashboardsQueryParam_IPortalMapdashboardsQueryParam; });
97297+
/* concated harmony reexport IPortalUser */__webpack_require__.d(__webpack_exports__, "IPortalUser", function() { return iPortalUser_IPortalUser; });
9727497298
/* concated harmony reexport Online */__webpack_require__.d(__webpack_exports__, "Online", function() { return Online_Online; });
9727597299
/* concated harmony reexport OnlineData */__webpack_require__.d(__webpack_exports__, "OnlineData", function() { return OnlineData_OnlineData; });
9727697300
/* concated harmony reexport OnlineQueryDatasParameter */__webpack_require__.d(__webpack_exports__, "OnlineQueryDatasParameter", function() { return OnlineQueryDatasParameter_OnlineQueryDatasParameter; });

0 commit comments

Comments
 (0)