369 lines
18 KiB
Plaintext
369 lines
18 KiB
Plaintext
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AssetSingleWorkspace.aspx.cs" Inherits="MapView_AssetSingleView" %>
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head runat="server">
|
|
<meta charset="utf-8" />
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
<meta name="format-detection" content="telephone=no" />
|
|
<title>Single Workspace</title>
|
|
<script type="text/javascript" src="<%=Common.GenerateUrl("js/jquery-1.11.3.js") %>"></script>
|
|
<script type="text/javascript" src="<%=Common.GenerateUrl("js/lib/vue.min.js") %>"></script>
|
|
<script type="text/javascript" src="<%=Common.GenerateUrl("js/promise.js") %>"></script>
|
|
<script type="text/javascript" src="<%=Common.GenerateUrl("fic/js/components/modal.js") %>"></script>
|
|
<script type="text/javascript" src="<%=Common.GenerateUrl("js/utility.js") %>"></script>
|
|
<script type="text/javascript" src="<%=Common.GenerateUrl("js/cookie.js") %>"></script>
|
|
<script type="text/javascript" src="<%=Common.GenerateUrl("fic/js/controls/dialog.js") %>"></script>
|
|
<script type="text/javascript" src="<%=Common.GenerateUrl("fic/js/controls/additionalFilter.js") %>"></script>
|
|
<script type="text/javascript" src="<%=Common.GenerateUrl("fic/js/controls/editGridCtrl.js") %>"></script>
|
|
<script type="text/javascript" src="<%=Common.GenerateUrl("fic/js/workspace.js") %>"></script>
|
|
|
|
<link type="text/css" href="<%=Common.GenerateUrl("fic/css/workspace.css") %>" rel="stylesheet" />
|
|
<link type="text/css" href="<%=Common.GenerateUrl("fic/js/components/css/override.css")%>" rel="stylesheet" />
|
|
<link type="text/css" href="<%=Common.GenerateUrl("fic/js/components/css/gridview.css")%>" rel="stylesheet" />
|
|
<link type="text/css" href="<%=Common.GenerateUrl("fic/js/components/css/datagrid.css") %>" rel="stylesheet" />
|
|
<link type="text/css" href="<%=Common.GenerateUrl("fic/js/components/css/design-grid.min.css") %>" rel="stylesheet" />
|
|
<link type="text/css" href="<%=Common.GenerateUrl("fic/css/chart.css")%>" rel="stylesheet" />
|
|
<link type="text/css" href="<%=Common.GenerateUrl("fic/css/pivot.css")%>" rel="stylesheet" />
|
|
<link type="text/css" href="<%=Common.GenerateUrl("fic/js/components/css/vue-ctrls.css") %>" rel="stylesheet" />
|
|
<link type="text/css" href="<%=Common.GenerateUrl("fic/css/form.css") %>" rel="stylesheet" />
|
|
<link type="text/css" href="<%=Common.GenerateUrl("fic/css/wizardctrl.css") %>" rel="stylesheet" />
|
|
<link type="text/css" href="<%=Common.GenerateUrl("fic/css/Grid.css")%>" rel="stylesheet" />
|
|
<link type="text/css" href="<%=Common.GenerateUrl("css/datepicker.min.css")%>" rel="stylesheet" />
|
|
<link type="text/css" href="<%=Common.GenerateUrl("fic/css/JsTreeCss/style.min.css")%>" rel="stylesheet" />
|
|
<link type="text/css" href="<%=Common.GenerateUrl("fic/css/tabcontrol.css") %>" rel="stylesheet" />
|
|
|
|
<style type="text/css">
|
|
body {
|
|
/* 禁止选中 */
|
|
-moz-user-select: none; /*火狐*/
|
|
-webkit-user-select: none; /*webkit浏览器*/
|
|
-ms-user-select: none; /*IE10*/
|
|
-khtml-user-select: none; /*早期浏览器*/
|
|
user-select: none;
|
|
overflow: hidden;
|
|
padding: 0;
|
|
margin: 0;
|
|
border: 0;
|
|
font-family: Verdana;
|
|
font-size: 13px;
|
|
}
|
|
|
|
table {
|
|
font-size: 13px;
|
|
}
|
|
|
|
input[type='checkbox'] {
|
|
vertical-align: -3px;
|
|
}
|
|
|
|
input[type='radio'] {
|
|
vertical-align: -3px;
|
|
}
|
|
|
|
input[type='text'] {
|
|
height: 20px;
|
|
}
|
|
|
|
select {
|
|
height: 21px;
|
|
}
|
|
|
|
.smaller {
|
|
font-size: 0.9em;
|
|
}
|
|
|
|
a {
|
|
text-decoration: none;
|
|
color: #2140fb;
|
|
}
|
|
|
|
a:hover {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
a:visited {
|
|
color: #2140fb;
|
|
}
|
|
|
|
#content {
|
|
width: 100%;
|
|
top: 0;
|
|
bottom: 0;
|
|
margin: 0;
|
|
position: fixed;
|
|
}
|
|
|
|
.clear {
|
|
display: block;
|
|
clear: both;
|
|
height: 0;
|
|
}
|
|
|
|
.wsp_pivot_panel {
|
|
display: none;
|
|
}
|
|
|
|
.boardContainer {
|
|
overflow: hidden;
|
|
}
|
|
</style>
|
|
|
|
<script type="text/javascript">
|
|
|
|
var param = {};
|
|
|
|
_utility.loginedUser = {};
|
|
_utility.isReadOnly = true;
|
|
|
|
// get the parameter
|
|
var search = location.search;
|
|
if (search[0] === '?') {
|
|
search = search.substring(1);
|
|
var s = search.split('&');
|
|
for (var i = 0; i < s.length; i++) {
|
|
var kv = s[i].split('=');
|
|
param[kv[0]] = decodeURIComponent(kv[1]);
|
|
}
|
|
}
|
|
_utility.currentLang = param.lgid;
|
|
|
|
var sitePath = "<%=this.ResolveUrl("~/fic/") %>";
|
|
_utility.rootPath ="<%=this.ResolveUrl("~/") %>";
|
|
ApplicationPath = sitePath;
|
|
var appPath = "<%=this.ResolveUrl("~/") %>";
|
|
|
|
function resizeBoard(charts) {
|
|
var maxWidth = 0, maxHeight = 0;
|
|
var docWidth = $(window.parent.document.body).width();
|
|
for (var i = 0; i < charts.length; i++) {
|
|
var c = charts[i];
|
|
var right = c.Left + c.Width + 16;
|
|
var bottom = c.Top + c.Height + 36;
|
|
if (right > maxWidth) {
|
|
maxWidth = right;
|
|
}
|
|
if (bottom > maxHeight) {
|
|
maxHeight = bottom;
|
|
}
|
|
}
|
|
if (maxWidth < docWidth) {
|
|
maxWidth = '100%';
|
|
}
|
|
window.parent.resizeBoard(maxWidth, maxHeight);
|
|
}
|
|
|
|
function resetPivot(pivots) {
|
|
var s = encodeURIComponent(JSON.stringify(pivots));
|
|
_utility.loadWspPivots('?wspivots=' + s);
|
|
}
|
|
|
|
</script>
|
|
|
|
<script type="text/javascript" src="<%=Common.GenerateUrl("js/echarts.min.js")%>"></script>
|
|
<%--<script type="text/javascript" src="//cdn.jsdelivr.net/npm/echarts@4.8.0/dist/echarts.js"></script>--%>
|
|
<script type="text/javascript" src="<%=Common.GenerateUrl("js/datepicker.min.js")%>"></script>
|
|
<script type="text/javascript" src="<%=Common.GenerateUrl("js/lib/vue-color.min.js")%>"></script>
|
|
<script type="text/javascript" src="<%=Common.GenerateUrl("fic/js/components/gridview.js")%>"></script>
|
|
<script type="text/javascript" src="<%=Common.GenerateUrl("fic/js/controls/about.js")%>"></script>
|
|
<script type="text/javascript" src="<%=Common.GenerateUrl("fic/js/menu.js")%>"></script>
|
|
<script type="text/javascript" src="<%=Common.GenerateUrl("fic/js/pivot.js")%>"></script>
|
|
<script type="text/javascript" src="<%=Common.GenerateUrl("fic/js/controls/controls.js") %>"></script>
|
|
<%--<script type="text/javascript" src="<%=Common.GenerateUrl("fic/js/controls/editGridCtrl.js") %>"></script>--%>
|
|
<script type="text/javascript" src="<%=Common.GenerateUrl("fic/js/components/datagrid.js")%>"></script>
|
|
<script type="text/javascript" src="<%=Common.GenerateUrl("fic/js/components/vue-ctrls.js")%>"></script>
|
|
<script type="text/javascript" src="<%=Common.GenerateUrl("fic/js/components/design-grid.min.js")%>"></script>
|
|
<script type="text/javascript" src="<%=Common.GenerateUrl("fic/js/controls/form.js") %>"></script>
|
|
<script type="text/javascript" src="<%=Common.GenerateUrl("fic/js/controls/wizardctrl.js") %>"></script>
|
|
|
|
<%-- 覆盖fic定义 --%>
|
|
<script type="text/javascript" src="<%=Common.GenerateUrl("fic/override.js")%>"></script>
|
|
<%--<script type="text/javascript" src="<%=Common.GenerateUrl("fic/g5masterjs.js")%>"></script>--%>
|
|
|
|
<script type="text/javascript" src="<%=Common.GenerateUrl("fic/js/controls/wsp_pivot.js")%>"></script>
|
|
<script type="text/javascript" src="<%=Common.GenerateUrl("fic/js/board.js")%>"></script>
|
|
<script type="text/javascript" src="<%=Common.GenerateUrl("fic/js/chart.js")%>"></script>
|
|
<script type="text/javascript" src="<%=Common.GenerateUrl("fic/js/charts/gauge.js")%>"></script>
|
|
<script type="text/javascript" src="<%=Common.GenerateUrl("fic/js/charts/scorecard.js")%>"></script>
|
|
<script type="text/javascript" src="<%=Common.GenerateUrl("fic/js/controls/gridctrl.js")%>"></script>
|
|
<script type="text/javascript" src="<%=Common.GenerateUrl("fic/js/charts/grid.js")%>"></script>
|
|
<script type="text/javascript" src="<%=Common.GenerateUrl("fic/js/charts/graph.js")%>"></script>
|
|
<script type="text/javascript" src="<%=Common.GenerateUrl("fic/js/charts/simplechart.js")%>"></script>
|
|
<script type="text/javascript" src="<%=Common.GenerateUrl("fic/js/charts/favorites.js")%>"></script>
|
|
<script type="text/javascript" src="<%=Common.GenerateUrl("fic/js/charts/fifrs.js")%>"></script>
|
|
<script type="text/javascript" src="<%=Common.GenerateUrl("fic/js/controls/jstree.min.js")%>"></script>
|
|
|
|
<script type="text/javascript" src="<%=Common.GenerateUrl("fic/js/chartManage/chartTypeWizard.js") %>"></script>
|
|
<script type="text/javascript" src="<%=Common.GenerateUrl("fic/js/Management/alertMessageWizard.js") %>"></script>
|
|
<script type="text/javascript" src="<%=Common.GenerateUrl("fic/js/chartManage/commonOp.js") %>"></script>
|
|
|
|
<script type="text/javascript" src="<%=Common.GenerateUrl("fic/js/Management/boardFilters.js") %>"></script>
|
|
<script type="text/javascript" src="<%=Common.GenerateUrl("fic/js/Management/workspaceFilters.js") %>"></script>
|
|
|
|
<script type="text/javascript">
|
|
// register the plugin
|
|
Vue.use(window['g5-vue-ctrls'].directives);
|
|
|
|
function GetUserParamter() {
|
|
return new Promise(function (resolve, reject) {
|
|
_network.query('GetUserParameters', [], function (data) {
|
|
if (data.Result) {
|
|
_utility.loginedUser.userIId = data.Result.LoginUserIID;
|
|
_utility.loginedUser.userId = data.Result.UserID;
|
|
_utility.loginedUser.useName = data.Result.UserName;
|
|
_utility.loginedUser.CanAccessPublic = data.Result.CanAccessPublic;
|
|
_utility.loginedUser.CanAccessSave = data.Result.CanAccessSave;
|
|
_utility.loginedUser.UserType = data.Result.UserType;
|
|
_utility.loginedUser.UserParameters = data.Result;
|
|
_utility.loginedUser.CanExportFile = data.Result.CanExportFile;
|
|
_workspace.displayLevel = _utility.loginedUser.UserParameters.DefaultDisplayLevels;
|
|
_workspace.displayRefreshTime = _utility.loginedUser.UserParameters.DefaultShowRefreshTime;
|
|
_workspace.setDisplayLevel(_workspace.displayLevel);
|
|
_workspace.pivotpinned = _utility.loginedUser.UserParameters.DefaultPinPivot;
|
|
_workspace.borderpinned = _utility.loginedUser.UserParameters.DefaultPinBorder;
|
|
|
|
//if (_utility.loginedUser.UserParameters.AutoRotateBoards) {
|
|
// _workspace.rotaBoardsTimer = setInterval(_workspace.RunRotaBoards, _utility.loginedUser.UserParameters.AutoRotateBoardsInterval * 1000);
|
|
//}
|
|
if (typeof _utility.startRotate === 'function') {
|
|
_utility.startRotate();
|
|
}
|
|
|
|
if (_utility.themes && _utility.themes[0]) {
|
|
var defaultSkin = _utility.themes[0].ID;
|
|
for (var i = 0; i < _utility.themes.length; i++) {
|
|
var t = _utility.themes[i];
|
|
if (_utility.loginedUser.UserParameters.DefaultSkin == t.ID) {
|
|
defaultSkin = t.ID;
|
|
break;
|
|
}
|
|
}
|
|
_workspace.onchangetheme(defaultSkin);
|
|
}
|
|
|
|
resolve();
|
|
} else {
|
|
//throw new Error('GetUserParamter error.');
|
|
alert(DEFAULT_LANG.not_signed);
|
|
window.location = sitePath + 'Logout.ashx';
|
|
}
|
|
}, reject);
|
|
});
|
|
}
|
|
|
|
function initLanguage() {
|
|
$("a,span,label,td").filter("[data-langKey]").each(
|
|
function () {
|
|
var thisElement = $(this);
|
|
thisElement.text(GetLanguageByKey(thisElement.data("langkey"), thisElement.data("defaultlang")));
|
|
}
|
|
);
|
|
DEFAULT_LANG.unknown_error = GetLanguageByKey("LHBIS_EXCEPTION_E0X65028018", DEFAULT_LANG.unknown_error);
|
|
DEFAULT_LANG.cannot_be_public = GetLanguageByKey("LHBIS_FIC_CLIENT_DIALOGS_RBOARDSAVEDIALOG_A010", DEFAULT_LANG.cannot_be_public);
|
|
DEFAULT_LANG.newboard = GetLanguageByKey("LHBIS_FIC_SILVERLIGHT_WSP_WORKSPACEPAGE_A006", DEFAULT_LANG.newboard);
|
|
DEFAULT_LANG.must_select_one = GetLanguageByKey("ERROR_LHBIS_FIC_BLC_COMMON_A0004", DEFAULT_LANG.must_select_one);
|
|
DEFAULT_LANG.filter = GetLanguageByKey("LHBIS_FIC_CHARTS_CHARTCLIENT_A015", DEFAULT_LANG.filter);
|
|
DEFAULT_LANG.multi = GetLanguageByKey("LHBIS_FIC_CHARTS_COMMONCHART_A009", DEFAULT_LANG.multi);
|
|
DEFAULT_LANG.ok = GetLanguageByKey('LHBIS_FIC_CLIENT_MODULES_RSUBSCRIBEMESSAGEDIALOG_A007', DEFAULT_LANG.ok);
|
|
DEFAULT_LANG.cancel = GetLanguageByKey('LHBIS_FIC_CLIENT_MODULES_RSUBSCRIBEMESSAGEDIALOG_A008', DEFAULT_LANG.cancel);
|
|
DEFAULT_LANG.save = GetLanguageByKey('LHBIS_FIC_CLIENT_MODULES_SNAPSHOTCTRL_LIST_A009', DEFAULT_LANG.save);
|
|
DEFAULT_LANG.no = GetLanguageByKey('LHBIS_FIC_CLIENT_MODULES_SYSTEMOPTIONSCTRL_A010', DEFAULT_LANG.no);
|
|
DEFAULT_LANG.yes = GetLanguageByKey('LHBIS_FIC_CLIENT_MODULES_SYSTEMOPTIONSCTRL_A009', DEFAULT_LANG.yes);
|
|
DEFAULT_LANG.all = GetLanguageByKey('LHBIS_FIC_CHARTS_COMMONCHART_A007', DEFAULT_LANG.all);
|
|
DEFAULT_LANG.level = GetLanguageByKey('LHBIS_MULTILANGUAGE_COMMON_A027', DEFAULT_LANG.level);
|
|
PIVOTVAL.ALL.text = GetLanguageByKey('LHBIS_FIC_CHARTS_COMMONCHART_A007', DEFAULT_LANG.all);
|
|
}
|
|
|
|
function init() {
|
|
// chart comments
|
|
var iframe = $('<iframe id="chart_comments_container" style="display:none;margin-right:-420px"></iframe>');
|
|
var email_iframe = $('<iframe id="email_subscription_container" style="display:none;margin-right:-900px"></iframe>');
|
|
var bg = $('<div id="chart_comments_bg" class="maskbg" style="display:none"></div>').click(function () {
|
|
iframe.stop().animate({ 'margin-right': -420 }, ANIMATE_FAST_SPEED, function () {
|
|
iframe.hide();
|
|
bg.hide();
|
|
});
|
|
email_iframe.stop().animate({ 'margin-right': -900 }, ANIMATE_FAST_SPEED, function () {
|
|
iframe.hide();
|
|
bg.hide();
|
|
});
|
|
});
|
|
$(document.body).append(bg, iframe);
|
|
$(document.body).append(bg, email_iframe);
|
|
}
|
|
|
|
function catchError(err) {
|
|
var msg = err;
|
|
if (msg != null && msg.message != null) {
|
|
msg = msg.message;
|
|
}
|
|
_utility.showMessage(msg, DEFAULT_LANG.FIC, null, function () {
|
|
window.location = sitePath + 'Logout.ashx';
|
|
});
|
|
}
|
|
|
|
function GetWorkspace(iid) {
|
|
return new Promise(function (resolve, reject) {
|
|
if (iid) {
|
|
_network.query('GetWorkspaceByIID', [iid], function (data) {
|
|
if (data.Result) {
|
|
if (_utility.workspaces == null || _utility.workspaces.length === 0) {
|
|
_utility.workspaces = [data.Result];
|
|
}
|
|
changeWorkspace(data.Result.IID, data.Result.WSPName, data.Result.Level, data.Result.Creater, data.Result.SecretType, data.Result.IsMyCreate, data.Result.WSPDescription);
|
|
}
|
|
|
|
resolve();
|
|
});
|
|
}
|
|
});
|
|
}
|
|
|
|
function changeWorkspace(iid, name, level, Creater, secrettype, IsMyCreate, WSPDescription) {
|
|
_network.query('GetWorkspacePersonalCheck', [iid], function (data) {
|
|
if (!data.Result && data.ErrorMessage) {
|
|
writelog("changeWorkspace", data.ErrorMessage, data.ErrorMessage);
|
|
} else {
|
|
var personalChecked = data.Result;
|
|
if (_workspace.changed && _utility.CanSaveAccessByPersonalIsVisableWhenLogout()) {
|
|
$alertdialog.showConfirm(DEFAULT_LANG.FIC,
|
|
GetLanguageByKey("LHBIS_FIC_SILVERLIGHT_WSP_WORKSPACEPAGE_A004", 'The Workspace setting defaults have changed, do you want to save the changes?'), [
|
|
[DEFAULT_LANG.cancel],
|
|
[DEFAULT_LANG.no, function () { _workspace.onchangewsp(iid, name, level, Creater, secrettype, personalChecked, IsMyCreate, WSPDescription); }],
|
|
[DEFAULT_LANG.yes, function () { _utility.doSaveWorkspace(function () { _workspace.onchangewsp(iid, name, level, Creater, secrettype, personalChecked, IsMyCreate, WSPDescription); }); }]
|
|
]);
|
|
} else {
|
|
_workspace.onchangewsp(iid, name, level, Creater, secrettype, personalChecked, IsMyCreate, WSPDescription);
|
|
}
|
|
|
|
}
|
|
});
|
|
}
|
|
|
|
$(function () {
|
|
GetUserParamter()
|
|
.then(function () {
|
|
GetWorkspace(param.iid).then(init);
|
|
})
|
|
.catch(catchError);
|
|
|
|
if (typeof window.parent.ondocumentclick == 'function') {
|
|
$(document.body).click(window.parent.ondocumentclick);
|
|
}
|
|
|
|
initLanguage();
|
|
|
|
// 初始化workspace
|
|
_workspace.container = '#content';
|
|
_workspace.init();
|
|
});
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div id="content">
|
|
Loading...
|
|
</div>
|
|
</body>
|
|
</html>
|