Skip to content

Commit b5f1a4b

Browse files
committed
iportl.js 添加查询单个服务、查询所有大屏、查询单个大屏、删除大屏API和对应示例。 --reviewed by huangqh,committed by wangzhe
1 parent 3a29aa8 commit b5f1a4b

39 files changed

+7451
-3505
lines changed

dist/classic/iclient-classic-es6.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4520,7 +4520,8 @@ class SecurityManager_SecurityManager {
45204520
if (!url) {
45214521
return url;
45224522
}
4523-
var patten = /http:\/\/(.*\/rest)/i;
4523+
// var patten = /http:\/\/(.*\/rest)/i;
4524+
var patten = /(http|https):\/\/(.*\/rest)/i;
45244525
var result = url.match(patten);
45254526
if (!result) {
45264527
return url;

dist/classic/iclient-classic-es6.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/classic/iclient-classic.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4160,7 +4160,8 @@ var SecurityManager = exports.SecurityManager = function () {
41604160
if (!url) {
41614161
return url;
41624162
}
4163-
var patten = /http:\/\/(.*\/rest)/i;
4163+
// var patten = /http:\/\/(.*\/rest)/i;
4164+
var patten = /(http|https):\/\/(.*\/rest)/i;
41644165
var result = url.match(patten);
41654166
if (!result) {
41664167
return url;

dist/classic/iclient-classic.min.js

Lines changed: 1 addition & 1 deletion
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: 204 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13890,7 +13890,8 @@ class SecurityManager_SecurityManager {
1389013890
if (!url) {
1389113891
return url;
1389213892
}
13893-
var patten = /http:\/\/(.*\/rest)/i;
13893+
// var patten = /http:\/\/(.*\/rest)/i;
13894+
var patten = /(http|https):\/\/(.*\/rest)/i;
1389413895
var result = url.match(patten);
1389513896
if (!result) {
1389613897
return url;
@@ -14760,6 +14761,127 @@ SuperMap.iPortalMap = iPortalMap_IPortalMap;
1476014761
SuperMap.iPortalScene = iPortalScene_IPortalScene;
1476114762

1476214763

14764+
// CONCATENATED MODULE: ./src/common/iPortal/iPortalMapdashboard.js
14765+
/* Copyright© 2000 - 2019 SuperMap Software Co.Ltd. All rights reserved.
14766+
* This program are made available under the terms of the Apache License, Version 2.0
14767+
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
14768+
14769+
14770+
14771+
14772+
/**
14773+
* @class SuperMap.iPortalMapdashboard
14774+
* @classdesc iPortal 大屏服务类。
14775+
* @category iPortal/Online
14776+
* @param {string} mapdashboardUrl - 大屏地址。
14777+
* @param {Object} [params] - 服务参数。
14778+
* @extends {SuperMap.iPortalServiceBase}
14779+
*
14780+
*/
14781+
class iPortalMapdashboard_IPortalMapdashboard extends iPortalServiceBase_IPortalServiceBase {
14782+
14783+
14784+
constructor(mapdashboardUrl, params) {
14785+
super(mapdashboardUrl);
14786+
params = params || {};
14787+
this.authorizeSetting = [];
14788+
this.content = "";
14789+
this.createTime = 0;
14790+
this.description = "";
14791+
this.id = 0;
14792+
this.name = "";
14793+
this.nickname = "";
14794+
this.tags = [];
14795+
this.thumbnail = "";
14796+
this.updateTime = 0;
14797+
this.userName = "";
14798+
this.visitCount = 0;
14799+
Util_Util.extend(this, params);
14800+
this.mapdashboardUrl = mapdashboardUrl;
14801+
}
14802+
14803+
/**
14804+
* @function SuperMap.iPortalMapdashboard.prototype.load
14805+
* @description 加载大屏信息。
14806+
* @returns {Promise} 返回 Promise 对象。如果成功,Promise 没有返回值,请求返回结果自动填充到该类的属性中;如果失败,Promise 返回值包含错误信息。
14807+
*/
14808+
load() {
14809+
var me = this;
14810+
return me.request("GET", me.mapdashboardUrl + ".json")
14811+
.then(function (mapdashboardInfo) {
14812+
if (mapdashboardInfo.error) {
14813+
return mapdashboardInfo;
14814+
}
14815+
for (var key in mapdashboardInfo) {
14816+
me[key] = mapdashboardInfo[key];
14817+
}
14818+
});
14819+
}
14820+
14821+
/**
14822+
* @function SuperMap.iPortalMapdashboard.prototype.update
14823+
* @description 更新大屏参数。
14824+
* @returns {Promise} 返回包含更新操作状态的 Promise 对象。
14825+
*/
14826+
update() {
14827+
var mapdashboardUpdateParam = {
14828+
authorizeSetting: this.authorizeSetting,
14829+
description: this.description,
14830+
name: this.name,
14831+
tags: this.tags,
14832+
thumbnail: this.thumbnail
14833+
};
14834+
var options = {
14835+
headers: {'Content-Type': 'application/x-www-form-urlencoded'}
14836+
};
14837+
return this.request("PUT", this.mapdashboardUrl, JSON.stringify(mapdashboardUpdateParam), options);
14838+
}
14839+
14840+
}
14841+
14842+
SuperMap.iPortalMapdashboard = iPortalMapdashboard_IPortalMapdashboard;
14843+
// CONCATENATED MODULE: ./src/common/iPortal/iPortalMapdashboardsQueryParam.js
14844+
/* Copyright© 2000 - 2019 SuperMap Software Co.Ltd. All rights reserved.
14845+
* This program are made available under the terms of the Apache License, Version 2.0
14846+
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
14847+
14848+
14849+
14850+
/**
14851+
* @class SuperMap.iPortalMapdashboardsQueryParam
14852+
* @classdesc iPortal 大屏资源查询参数。
14853+
* @category iPortal/Online
14854+
* @param {Object} params - iPortal 大屏资源查询具体参数。
14855+
*
14856+
*/
14857+
class iPortalMapdashboardsQueryParam_IPortalMapdashboardsQueryParam {
14858+
14859+
14860+
constructor(params) {
14861+
params = params || {};
14862+
this.userNames = null;
14863+
this.tags = null;
14864+
this.orderBy = null;
14865+
this.filterFields = null;
14866+
this.currentUser = null;
14867+
this.dirIds = null;
14868+
this.returnSubDir = false;
14869+
this.isNotInDir = false;
14870+
this.groupIds = null;
14871+
this.departmentIds = null;
14872+
this.resourceIds = null;
14873+
this.searchScope = null;
14874+
this.permissionType = null;
14875+
this.keywords = null;
14876+
this.currentPage = null;
14877+
this.pageSize = null;
14878+
this.orderType = null;
14879+
Util_Util.extend(this, params);
14880+
}
14881+
14882+
}
14883+
14884+
SuperMap.iPortalMapdashboardsQueryParam = iPortalMapdashboardsQueryParam_IPortalMapdashboardsQueryParam;
1476314885
// CONCATENATED MODULE: ./src/common/iPortal/iPortal.js
1476414886
/* Copyright© 2000 - 2019 SuperMap Software Co.Ltd. All rights reserved.
1476514887
* This program are made available under the terms of the Apache License, Version 2.0
@@ -14776,6 +14898,8 @@ SuperMap.iPortalMap = iPortalMap_IPortalMap;
1477614898

1477714899

1477814900

14901+
14902+
1477914903
/**
1478014904
* @class SuperMap.iPortal
1478114905
* @classdesc 对接 SuperMap iPortal 基础服务。
@@ -14832,6 +14956,20 @@ class iPortal_IPortal extends iPortalServiceBase_IPortalServiceBase {
1483214956
return this.request("DELETE", serviceUrl, { ids: ids });
1483314957
}
1483414958

14959+
/**
14960+
* @function SuperMap.iPortal.prototype.queryService
14961+
* @param {Array} ids - 服务的序号。
14962+
* @description 查看单个服务资源的详情。
14963+
* @returns {Promise} 返回包含单个服务资源操作状态的 Promise 对象。
14964+
*/
14965+
queryService(id){
14966+
var serviceUrl = this.iportalUrl + "/web/services/" + id;
14967+
var service = new iPortalService_IPortalService(serviceUrl);
14968+
return service.load().then(()=>{
14969+
return service
14970+
})
14971+
}
14972+
1483514973
/**
1483614974
* @function SuperMap.iPortal.prototype.queryMaps
1483714975
* @param {SuperMap.iPortalMapsQueryParam} queryParams - 查询参数。
@@ -14866,6 +15004,65 @@ class iPortal_IPortal extends iPortalServiceBase_IPortalServiceBase {
1486615004
});
1486715005
}
1486815006

15007+
/**
15008+
* @function SuperMap.iPortal.prototype.queryMapdashboards
15009+
* @param {SuperMap.iPortalMapdashboardsQueryParam} queryParams - 查询参数。
15010+
* @description 获取大屏信息。
15011+
* @returns {Promise} 返回包含所有大屏服务信息的 Promise 对象。
15012+
*/
15013+
queryMapdashboards(queryParams) {
15014+
if (!(queryParams instanceof iPortalMapdashboardsQueryParam_IPortalMapdashboardsQueryParam)) {
15015+
return null;
15016+
}
15017+
let mapdashboardsUrl;
15018+
if (this.withCredentials) {
15019+
mapdashboardsUrl = this.iportalUrl + "web/mycontent/mapdashboards";
15020+
} else {
15021+
mapdashboardsUrl = this.iportalUrl + "/web/mapdashboards";
15022+
}
15023+
return this.request("GET", mapdashboardsUrl, queryParams).then(function(result) {
15024+
var mapdashboardRetult = {content:[]};
15025+
var mapdashboards = [];
15026+
if (result.content && result.content.length > 0) {
15027+
result.content.map(function(mapdashboardJsonObj) {
15028+
mapdashboards.push(new iPortalMapdashboard_IPortalMapdashboard(mapdashboardsUrl + "/" + mapdashboardJsonObj.id, mapdashboardJsonObj));
15029+
return mapdashboardJsonObj;
15030+
});
15031+
mapdashboardRetult.content = mapdashboards;
15032+
mapdashboardRetult.currentPage = result.currentPage;
15033+
mapdashboardRetult.pageSize = result.pageSize;
15034+
mapdashboardRetult.total = result.total;
15035+
mapdashboardRetult.totalPage = result.totalPage;
15036+
}
15037+
return mapdashboardRetult;
15038+
});
15039+
}
15040+
15041+
/**
15042+
* @function SuperMap.iPortal.prototype.deleteMapdashboards
15043+
* @param {Array} ids - 大屏的序号。
15044+
* @description 删除大屏。
15045+
* @returns {Promise} 返回包含大屏删除操作状态的 Promise 对象。
15046+
*/
15047+
deleteMapdashboards(ids) {
15048+
var mapdashboardUrl = this.iportalUrl + "/web/mapdashboardsworkspaces.json";
15049+
return this.request("DELETE", mapdashboardUrl, { ids: encodeURI(JSON.stringify(ids)) });
15050+
}
15051+
15052+
/**
15053+
* @function SuperMap.iPortal.prototype.viewInsightDetail
15054+
* @param {Array} ids - 大屏的序号。
15055+
* @description 查看某个大屏资源的详情。
15056+
* @returns {Promise} 返回包含某条大屏资源操作状态的 Promise 对象。
15057+
*/
15058+
queryMapdashboard(id){
15059+
var mapdashboardUrl = this.iportalUrl + "/web/mapdashboards/"+id;
15060+
var mapdashboard = new iPortalMapdashboard_IPortalMapdashboard(mapdashboardUrl);
15061+
return mapdashboard.load().then(()=>{
15062+
return mapdashboard
15063+
})
15064+
}
15065+
1486915066
/**
1487015067
* @function SuperMap.iPortal.prototype.queryInsights
1487115068
* @param {SuperMap.iPortalInsightsQueryParam} queryParams - 查询参数。
@@ -15004,6 +15201,10 @@ SuperMap.iPortal = iPortal_IPortal;
1500415201

1500515202

1500615203

15204+
15205+
15206+
15207+
1500715208

1500815209

1500915210

@@ -95405,6 +95606,8 @@ external_L_default.a.supermap.components.dataServiceQuery = DataServiceQueryView
9540595606
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "IPortalService", function() { return iPortalService_IPortalService; });
9540695607
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "IPortalServiceBase", function() { return iPortalServiceBase_IPortalServiceBase; });
9540795608
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "IPortalServicesQueryParam", function() { return iPortalServicesQueryParam_IPortalServicesQueryParam; });
95609+
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "IPortalMapdashboard", function() { return iPortalMapdashboard_IPortalMapdashboard; });
95610+
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "IPortalMapdashboardsQueryParam", function() { return iPortalMapdashboardsQueryParam_IPortalMapdashboardsQueryParam; });
9540895611
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "Online", function() { return Online_Online; });
9540995612
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "OnlineData", function() { return OnlineData_OnlineData; });
9541095613
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "OnlineQueryDatasParameter", function() { return OnlineQueryDatasParameter_OnlineQueryDatasParameter; });

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy