2022-11-15 18:47:16 +08:00
|
|
|
|
var ytAjax = typeof YourTeam !== "undefined" ? new YourTeam.Ajax() : null; //公用AJAX初始化
|
2023-02-02 17:17:07 +08:00
|
|
|
|
var baseApiUrl = "http://localhost:3604"; // 本地開發用
|
|
|
|
|
var baseImgUrl = "https://localhost:44376"; // 本地開發用
|
|
|
|
|
|
|
|
|
|
// Mitsubishi
|
|
|
|
|
//var baseApiUrl = "http://220.132.206.5"; // production 用
|
|
|
|
|
//var baseImgUrl = "http://220.132.206.5:8848"; // production 用
|
|
|
|
|
|
|
|
|
|
// WSP
|
|
|
|
|
//var baseApiUrl = "http://220.132.206.5"; // production 用
|
|
|
|
|
//var baseImgUrl = "http://220.132.206.5:8849"; // production 用
|
|
|
|
|
|
|
|
|
|
//var baseApiUrl = "http://localhost";
|
|
|
|
|
//var baseImgUrl = "http://localhost:8848";
|
|
|
|
|
|
2022-11-15 15:05:32 +08:00
|
|
|
|
var varRegApiUrl = "/reg/api/"; //註冊API路徑
|
|
|
|
|
var varApiUrl = "/api/"; //API路徑
|
2022-12-27 18:44:22 +08:00
|
|
|
|
var varPathDevIcon = "/upload/device_icon/";
|
2022-11-15 15:05:32 +08:00
|
|
|
|
var varPathImg = "/Upload/Images/";
|
|
|
|
|
var varPathFile = "/Upload/Files/";
|
2022-12-14 15:57:49 +08:00
|
|
|
|
var varGraPath = "/upload/graph_manage";
|
2022-11-15 15:05:32 +08:00
|
|
|
|
var statusArr = { 1: "啟用", 0: "未啟用", 9: "刪除" };
|
2022-11-30 18:31:10 +08:00
|
|
|
|
var common = {
|
|
|
|
|
AddSuc: "新增成功",
|
|
|
|
|
EditSuc: "編輯成功",
|
|
|
|
|
DelSuc: "刪除成功",
|
|
|
|
|
AddErr: "新增失敗,",
|
|
|
|
|
EditErr: "編輯失敗,",
|
|
|
|
|
DelErr: "刪除失敗,",
|
|
|
|
|
SysErr: "系統內部發生錯誤,請聯繫系統管理員"
|
|
|
|
|
}
|
2022-11-16 15:16:18 +08:00
|
|
|
|
var objSendData = { Data: null };
|
2023-02-02 17:17:07 +08:00
|
|
|
|
// Mitsubishi
|
2022-12-27 15:17:52 +08:00
|
|
|
|
var initAreaTag = "TPE";
|
2023-03-01 10:49:35 +08:00
|
|
|
|
var n4Sup = "Mitsubishi_Sup";
|
2023-02-02 17:17:07 +08:00
|
|
|
|
// WSP
|
|
|
|
|
//var initAreaTag = "NTPC";
|
|
|
|
|
//var n4Sup = "Banqiao";
|
2022-12-27 15:17:52 +08:00
|
|
|
|
var forgeTokenBase = {
|
|
|
|
|
url: baseApiUrl + '/api/forge/oauth/token',
|
|
|
|
|
res_access_token: ["dictionary", "access_token"],
|
|
|
|
|
res_expires_in: ["dictionary", "expires_in"]
|
|
|
|
|
};
|
2022-11-16 15:16:18 +08:00
|
|
|
|
|
|
|
|
|
//重新轉址 for Niagara4
|
|
|
|
|
var temp_cuurent_Url_pathname = window.location.pathname.split("/").slice(0, 3);
|
|
|
|
|
var redirectionUrl = window.location.origin + "/" +
|
|
|
|
|
temp_cuurent_Url_pathname[temp_cuurent_Url_pathname.length - 1].replace(":%5E", "/") + "/" +
|
|
|
|
|
window.location.pathname.split("/").slice(3).join("/");
|
|
|
|
|
//判斷url是否包含"ord",如果有重新轉址
|
|
|
|
|
if (temp_cuurent_Url_pathname.findIndex(x => x == "ord") > -1) {
|
|
|
|
|
document.location.href = redirectionUrl.substr(0, redirectionUrl.length - 1);
|
2023-02-02 17:17:07 +08:00
|
|
|
|
}
|