|
|
@ -1,25 +1,25 @@ |
|
|
|
import { DigiMiddlewareAuthApp } from './app-auth-token'; |
|
|
|
import { IDWDmcUserInfo } from '@webdpt/framework/config'; |
|
|
|
import { DigiMiddlewareAuthApp } from "./app-auth-token"; |
|
|
|
import { IDWDmcUserInfo } from "@webdpt/framework/config"; |
|
|
|
|
|
|
|
// 開發環境變數
|
|
|
|
export const SYSTEM_CONFIG: IAppConfig = { |
|
|
|
dwAppId: 'Athena', |
|
|
|
dwAppName: '鼎捷数智', |
|
|
|
defaultApp: '/', |
|
|
|
dwLogoPath: './assets/img/dwLogo.png', |
|
|
|
dwDateFormat: 'yyyy/MM/dd', |
|
|
|
dwTimeFormat: 'HH:mm:ss', |
|
|
|
dwAppId: "Athena", |
|
|
|
dwAppName: "鼎捷数智", |
|
|
|
defaultApp: "/", |
|
|
|
dwLogoPath: "./assets/img/dwLogo.png", |
|
|
|
dwDateFormat: "yyyy/MM/dd", |
|
|
|
dwTimeFormat: "HH:mm:ss", |
|
|
|
dwUsingTab: false, |
|
|
|
dwTabMultiOpen: false, |
|
|
|
defaultLogin: '/login', |
|
|
|
defaultLogin: "/login", |
|
|
|
dwAppAuthToken: DigiMiddlewareAuthApp, |
|
|
|
dwLoadMaskHttp: true, |
|
|
|
dwLoadMaskDelay: 0, |
|
|
|
dwDmcUserInfo: { |
|
|
|
username: '', |
|
|
|
password: '' |
|
|
|
username: "", |
|
|
|
password: "", |
|
|
|
}, |
|
|
|
dwTabStoreStrategy: 'session' |
|
|
|
dwTabStoreStrategy: "session", |
|
|
|
}; |
|
|
|
|
|
|
|
export interface IAppConfig { |
|
|
@ -36,18 +36,18 @@ export interface IAppConfig { |
|
|
|
dwLoadMaskHttp: boolean; // HTTP加載遮罩是否啟用
|
|
|
|
dwLoadMaskDelay: number; // 延遲顯示加載效果的時間毫秒
|
|
|
|
dwDmcUserInfo: IDWDmcUserInfo; // 文檔中心的登入帳密
|
|
|
|
dwTabStoreStrategy?: 'session' | 'local' | 'none'; // 多頁籤儲存策略
|
|
|
|
dwTabStoreStrategy?: "session" | "local" | "none"; // 多頁籤儲存策略
|
|
|
|
} |
|
|
|
|
|
|
|
function loadJSON(filePath: string): any { |
|
|
|
const json = loadTextFileAjaxSync(filePath, 'application/json'); |
|
|
|
const json = loadTextFileAjaxSync(filePath, "application/json"); |
|
|
|
const obj = JSON.parse(json); |
|
|
|
return obj; |
|
|
|
} |
|
|
|
|
|
|
|
function loadTextFileAjaxSync(filePath: string, mimeType: string): string { |
|
|
|
const xmlhttp = new XMLHttpRequest(); |
|
|
|
xmlhttp.open('GET', filePath, false); |
|
|
|
xmlhttp.open("GET", filePath, false); |
|
|
|
if (mimeType != null) { |
|
|
|
if (xmlhttp.overrideMimeType) { |
|
|
|
xmlhttp.overrideMimeType(mimeType); |
|
|
|