@gct-paas/core 0.1.6-dev.19 → 0.1.6-dev.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- /*! @gct-paas/core v0.1.6-dev.19 */
1
+ /*! @gct-paas/core v0.1.6-dev.20 */
2
2
  import{createElementBlock as e,defineComponent as r,openBlock as t,unref as a}from"vue";import{useRouter as p}from"vue-router";var o=/* @__PURE__ */r({__name:"redirect-index",setup(r){const{currentRoute:o,replace:i}=p(),{params:s,query:u}=a(o),{path:m,_redirect_type:n="path"}=s;Reflect.deleteProperty(s,"_redirect_type"),Reflect.deleteProperty(s,"path");const c=Array.isArray(m)?m.join("/"):m;return i("name"===n?{name:c,query:u,params:JSON.parse(s._origin_params??"{}")}:{path:c.startsWith("/")?c:"/"+c,query:u}),(r,a)=>(t(),e("div"))}});export{o as default};
@@ -49,18 +49,18 @@ export declare class GctGlobal {
49
49
  deploySetting: {
50
50
  deployMode: import('../..').DeployModeEnum;
51
51
  };
52
- setDeploySetting: (data: import('@gct-paas/api/platform').SysConfigResponse) => void;
52
+ setDeploySetting: (data: IObject | undefined) => void;
53
53
  isIndependentApp: import('vue').ComputedRef<boolean>;
54
54
  loginSetting: import('@gct-paas/api/platform').AuthConfig;
55
55
  postLoginSetting: () => Promise<void>;
56
- setLoginSetting: (config: import('@gct-paas/api/platform').SysConfigResponse | undefined) => void;
56
+ setLoginSetting: (config: IObject | undefined) => void;
57
57
  loginModeAuthTypes: import('vue').Ref<string[], string[]>;
58
58
  openIDOAuthAuthTypes: import('vue').Ref<string[], string[]>;
59
59
  sysLoginSort: import('vue').Ref<IObject[], IObject[]>;
60
60
  openIDOAuthAuthSort: import('vue').Ref<IObject[], IObject[]>;
61
61
  loginModeConfig: Map<string, IObject>;
62
62
  orgSetting: import('@gct-paas/api/platform').OrgConfig;
63
- setOrgSetting: (data: import('@gct-paas/api/platform').SysConfigResponse) => void;
63
+ setOrgSetting: (data: IObject) => void;
64
64
  postOrgSetting: () => Promise<void>;
65
65
  relationFields: import('vue').Ref<{
66
66
  label: string;
@@ -87,7 +87,7 @@ export declare class GctGlobal {
87
87
  }[]>;
88
88
  securitySetting: import('@gct-paas/api/platform').SecurityConfig;
89
89
  postSecuritySetting: () => Promise<void>;
90
- setSecuritySetting: (data: import('@gct-paas/api/platform').SysConfigResponse) => void;
90
+ setSecuritySetting: (data: IObject | undefined) => void;
91
91
  getSignWay: () => "DOMAIN" | "LOGIN" | "SIGN";
92
92
  themeSetting: import('../..').IThemeSetting;
93
93
  setThemeSetting: (data: import('@gct-paas/api/platform').SysConfigResponse) => void;
@@ -110,7 +110,7 @@ export declare class GctGlobal {
110
110
  height: number;
111
111
  };
112
112
  postWatermarkSetting: () => Promise<void>;
113
- setWatermarkSetting: (data: import('@gct-paas/api/platform').SysConfigResponse) => void;
113
+ setWatermarkSetting: (data: IObject | undefined) => void;
114
114
  projectSetting: {};
115
115
  setProjectConfig: (config: {}) => void;
116
116
  init: () => Promise<void>;
@@ -122,18 +122,18 @@ export declare class GctGlobal {
122
122
  deploySetting: {
123
123
  deployMode: import('../..').DeployModeEnum;
124
124
  };
125
- setDeploySetting: (data: import('@gct-paas/api/platform').SysConfigResponse) => void;
125
+ setDeploySetting: (data: IObject | undefined) => void;
126
126
  isIndependentApp: import('vue').ComputedRef<boolean>;
127
127
  loginSetting: import('@gct-paas/api/platform').AuthConfig;
128
128
  postLoginSetting: () => Promise<void>;
129
- setLoginSetting: (config: import('@gct-paas/api/platform').SysConfigResponse | undefined) => void;
129
+ setLoginSetting: (config: IObject | undefined) => void;
130
130
  loginModeAuthTypes: import('vue').Ref<string[], string[]>;
131
131
  openIDOAuthAuthTypes: import('vue').Ref<string[], string[]>;
132
132
  sysLoginSort: import('vue').Ref<IObject[], IObject[]>;
133
133
  openIDOAuthAuthSort: import('vue').Ref<IObject[], IObject[]>;
134
134
  loginModeConfig: Map<string, IObject>;
135
135
  orgSetting: import('@gct-paas/api/platform').OrgConfig;
136
- setOrgSetting: (data: import('@gct-paas/api/platform').SysConfigResponse) => void;
136
+ setOrgSetting: (data: IObject) => void;
137
137
  postOrgSetting: () => Promise<void>;
138
138
  relationFields: import('vue').Ref<{
139
139
  label: string;
@@ -160,7 +160,7 @@ export declare class GctGlobal {
160
160
  }[]>;
161
161
  securitySetting: import('@gct-paas/api/platform').SecurityConfig;
162
162
  postSecuritySetting: () => Promise<void>;
163
- setSecuritySetting: (data: import('@gct-paas/api/platform').SysConfigResponse) => void;
163
+ setSecuritySetting: (data: IObject | undefined) => void;
164
164
  getSignWay: () => "DOMAIN" | "LOGIN" | "SIGN";
165
165
  themeSetting: import('../..').IThemeSetting;
166
166
  setThemeSetting: (data: import('@gct-paas/api/platform').SysConfigResponse) => void;
@@ -183,7 +183,7 @@ export declare class GctGlobal {
183
183
  height: number;
184
184
  };
185
185
  postWatermarkSetting: () => Promise<void>;
186
- setWatermarkSetting: (data: import('@gct-paas/api/platform').SysConfigResponse) => void;
186
+ setWatermarkSetting: (data: IObject | undefined) => void;
187
187
  projectSetting: {};
188
188
  setProjectConfig: (config: {}) => void;
189
189
  init: () => Promise<void>;
@@ -195,18 +195,18 @@ export declare class GctGlobal {
195
195
  deploySetting: {
196
196
  deployMode: import('../..').DeployModeEnum;
197
197
  };
198
- setDeploySetting: (data: import('@gct-paas/api/platform').SysConfigResponse) => void;
198
+ setDeploySetting: (data: IObject | undefined) => void;
199
199
  isIndependentApp: import('vue').ComputedRef<boolean>;
200
200
  loginSetting: import('@gct-paas/api/platform').AuthConfig;
201
201
  postLoginSetting: () => Promise<void>;
202
- setLoginSetting: (config: import('@gct-paas/api/platform').SysConfigResponse | undefined) => void;
202
+ setLoginSetting: (config: IObject | undefined) => void;
203
203
  loginModeAuthTypes: import('vue').Ref<string[], string[]>;
204
204
  openIDOAuthAuthTypes: import('vue').Ref<string[], string[]>;
205
205
  sysLoginSort: import('vue').Ref<IObject[], IObject[]>;
206
206
  openIDOAuthAuthSort: import('vue').Ref<IObject[], IObject[]>;
207
207
  loginModeConfig: Map<string, IObject>;
208
208
  orgSetting: import('@gct-paas/api/platform').OrgConfig;
209
- setOrgSetting: (data: import('@gct-paas/api/platform').SysConfigResponse) => void;
209
+ setOrgSetting: (data: IObject) => void;
210
210
  postOrgSetting: () => Promise<void>;
211
211
  relationFields: import('vue').Ref<{
212
212
  label: string;
@@ -233,7 +233,7 @@ export declare class GctGlobal {
233
233
  }[]>;
234
234
  securitySetting: import('@gct-paas/api/platform').SecurityConfig;
235
235
  postSecuritySetting: () => Promise<void>;
236
- setSecuritySetting: (data: import('@gct-paas/api/platform').SysConfigResponse) => void;
236
+ setSecuritySetting: (data: IObject | undefined) => void;
237
237
  getSignWay: () => "DOMAIN" | "LOGIN" | "SIGN";
238
238
  themeSetting: import('../..').IThemeSetting;
239
239
  setThemeSetting: (data: import('@gct-paas/api/platform').SysConfigResponse) => void;
@@ -256,7 +256,7 @@ export declare class GctGlobal {
256
256
  height: number;
257
257
  };
258
258
  postWatermarkSetting: () => Promise<void>;
259
- setWatermarkSetting: (data: import('@gct-paas/api/platform').SysConfigResponse) => void;
259
+ setWatermarkSetting: (data: IObject | undefined) => void;
260
260
  projectSetting: {};
261
261
  setProjectConfig: (config: {}) => void;
262
262
  init: () => Promise<void>;
@@ -35,5 +35,13 @@ export interface IAppContext {
35
35
  *环境变量
36
36
  */
37
37
  env?: EnvironmentType;
38
+ /**
39
+ * 应用模式
40
+ * single 单应用模式
41
+ */
42
+ applicationMode?: 'single';
43
+ /**
44
+ * 应用标识
45
+ */
38
46
  [key: string]: unknown;
39
47
  }
@@ -32,6 +32,18 @@ export interface IModal {
32
32
  * @type {IModalHooks}
33
33
  */
34
34
  hooks: IModalHooks;
35
+ /**
36
+ * 模态界面状态
37
+ *
38
+ * @type {{
39
+ * okDisabled?: boolean; // 确认按钮是否禁用
40
+ * cancelDisabled?: boolean; // 取消按钮是否禁用
41
+ * }}
42
+ */
43
+ state: {
44
+ okDisabled?: boolean;
45
+ cancelDisabled?: boolean;
46
+ };
35
47
  /**
36
48
  * 统一关闭入口
37
49
  *
@@ -10,7 +10,7 @@ export declare enum EnvironmentType {
10
10
  /** 生产环境 */
11
11
  PROD = "prod",
12
12
  /** 沙箱环境 */
13
- SANDBOX = "sandbox"
13
+ SANDBOX = "sbx"
14
14
  }
15
15
  /**
16
16
  * 环境管理器接口
@@ -10,7 +10,7 @@ var EnvironmentType = /* @__PURE__ */ function(EnvironmentType) {
10
10
  /** 生产环境 */
11
11
  EnvironmentType["PROD"] = "prod";
12
12
  /** 沙箱环境 */
13
- EnvironmentType["SANDBOX"] = "sandbox";
13
+ EnvironmentType["SANDBOX"] = "sbx";
14
14
  return EnvironmentType;
15
15
  }({});
16
16
  //#endregion
@@ -9,18 +9,18 @@ export declare const usePlatformConfigStore: import('pinia').StoreDefinition<"pl
9
9
  deploySetting: {
10
10
  deployMode: import('./enums').DeployModeEnum;
11
11
  };
12
- setDeploySetting: (data: SysConfigResponse) => void;
12
+ setDeploySetting: (data: IObject | undefined) => void;
13
13
  isIndependentApp: import('vue').ComputedRef<boolean>;
14
14
  loginSetting: import('@gct-paas/api/platform').AuthConfig;
15
15
  postLoginSetting: () => Promise<void>;
16
- setLoginSetting: (config: SysConfigResponse | undefined) => void;
16
+ setLoginSetting: (config: IObject | undefined) => void;
17
17
  loginModeAuthTypes: import('vue').Ref<string[], string[]>;
18
18
  openIDOAuthAuthTypes: import('vue').Ref<string[], string[]>;
19
19
  sysLoginSort: import('vue').Ref<IObject[], IObject[]>;
20
20
  openIDOAuthAuthSort: import('vue').Ref<IObject[], IObject[]>;
21
21
  loginModeConfig: Map<string, IObject>;
22
22
  orgSetting: import('@gct-paas/api/platform').OrgConfig;
23
- setOrgSetting: (data: SysConfigResponse) => void;
23
+ setOrgSetting: (data: IObject) => void;
24
24
  postOrgSetting: () => Promise<void>;
25
25
  relationFields: import('vue').Ref<{
26
26
  label: string;
@@ -47,7 +47,7 @@ export declare const usePlatformConfigStore: import('pinia').StoreDefinition<"pl
47
47
  }[]>;
48
48
  securitySetting: import('@gct-paas/api/platform').SecurityConfig;
49
49
  postSecuritySetting: () => Promise<void>;
50
- setSecuritySetting: (data: SysConfigResponse) => void;
50
+ setSecuritySetting: (data: IObject | undefined) => void;
51
51
  getSignWay: () => "DOMAIN" | "LOGIN" | "SIGN";
52
52
  themeSetting: import('./interfaces').IThemeSetting;
53
53
  setThemeSetting: (data: SysConfigResponse) => void;
@@ -70,7 +70,7 @@ export declare const usePlatformConfigStore: import('pinia').StoreDefinition<"pl
70
70
  height: number;
71
71
  };
72
72
  postWatermarkSetting: () => Promise<void>;
73
- setWatermarkSetting: (data: SysConfigResponse) => void;
73
+ setWatermarkSetting: (data: IObject | undefined) => void;
74
74
  projectSetting: {};
75
75
  setProjectConfig: (config: {}) => void;
76
76
  init: () => Promise<void>;
@@ -82,18 +82,18 @@ export declare const usePlatformConfigStore: import('pinia').StoreDefinition<"pl
82
82
  deploySetting: {
83
83
  deployMode: import('./enums').DeployModeEnum;
84
84
  };
85
- setDeploySetting: (data: SysConfigResponse) => void;
85
+ setDeploySetting: (data: IObject | undefined) => void;
86
86
  isIndependentApp: import('vue').ComputedRef<boolean>;
87
87
  loginSetting: import('@gct-paas/api/platform').AuthConfig;
88
88
  postLoginSetting: () => Promise<void>;
89
- setLoginSetting: (config: SysConfigResponse | undefined) => void;
89
+ setLoginSetting: (config: IObject | undefined) => void;
90
90
  loginModeAuthTypes: import('vue').Ref<string[], string[]>;
91
91
  openIDOAuthAuthTypes: import('vue').Ref<string[], string[]>;
92
92
  sysLoginSort: import('vue').Ref<IObject[], IObject[]>;
93
93
  openIDOAuthAuthSort: import('vue').Ref<IObject[], IObject[]>;
94
94
  loginModeConfig: Map<string, IObject>;
95
95
  orgSetting: import('@gct-paas/api/platform').OrgConfig;
96
- setOrgSetting: (data: SysConfigResponse) => void;
96
+ setOrgSetting: (data: IObject) => void;
97
97
  postOrgSetting: () => Promise<void>;
98
98
  relationFields: import('vue').Ref<{
99
99
  label: string;
@@ -120,7 +120,7 @@ export declare const usePlatformConfigStore: import('pinia').StoreDefinition<"pl
120
120
  }[]>;
121
121
  securitySetting: import('@gct-paas/api/platform').SecurityConfig;
122
122
  postSecuritySetting: () => Promise<void>;
123
- setSecuritySetting: (data: SysConfigResponse) => void;
123
+ setSecuritySetting: (data: IObject | undefined) => void;
124
124
  getSignWay: () => "DOMAIN" | "LOGIN" | "SIGN";
125
125
  themeSetting: import('./interfaces').IThemeSetting;
126
126
  setThemeSetting: (data: SysConfigResponse) => void;
@@ -143,7 +143,7 @@ export declare const usePlatformConfigStore: import('pinia').StoreDefinition<"pl
143
143
  height: number;
144
144
  };
145
145
  postWatermarkSetting: () => Promise<void>;
146
- setWatermarkSetting: (data: SysConfigResponse) => void;
146
+ setWatermarkSetting: (data: IObject | undefined) => void;
147
147
  projectSetting: {};
148
148
  setProjectConfig: (config: {}) => void;
149
149
  init: () => Promise<void>;
@@ -155,18 +155,18 @@ export declare const usePlatformConfigStore: import('pinia').StoreDefinition<"pl
155
155
  deploySetting: {
156
156
  deployMode: import('./enums').DeployModeEnum;
157
157
  };
158
- setDeploySetting: (data: SysConfigResponse) => void;
158
+ setDeploySetting: (data: IObject | undefined) => void;
159
159
  isIndependentApp: import('vue').ComputedRef<boolean>;
160
160
  loginSetting: import('@gct-paas/api/platform').AuthConfig;
161
161
  postLoginSetting: () => Promise<void>;
162
- setLoginSetting: (config: SysConfigResponse | undefined) => void;
162
+ setLoginSetting: (config: IObject | undefined) => void;
163
163
  loginModeAuthTypes: import('vue').Ref<string[], string[]>;
164
164
  openIDOAuthAuthTypes: import('vue').Ref<string[], string[]>;
165
165
  sysLoginSort: import('vue').Ref<IObject[], IObject[]>;
166
166
  openIDOAuthAuthSort: import('vue').Ref<IObject[], IObject[]>;
167
167
  loginModeConfig: Map<string, IObject>;
168
168
  orgSetting: import('@gct-paas/api/platform').OrgConfig;
169
- setOrgSetting: (data: SysConfigResponse) => void;
169
+ setOrgSetting: (data: IObject) => void;
170
170
  postOrgSetting: () => Promise<void>;
171
171
  relationFields: import('vue').Ref<{
172
172
  label: string;
@@ -193,7 +193,7 @@ export declare const usePlatformConfigStore: import('pinia').StoreDefinition<"pl
193
193
  }[]>;
194
194
  securitySetting: import('@gct-paas/api/platform').SecurityConfig;
195
195
  postSecuritySetting: () => Promise<void>;
196
- setSecuritySetting: (data: SysConfigResponse) => void;
196
+ setSecuritySetting: (data: IObject | undefined) => void;
197
197
  getSignWay: () => "DOMAIN" | "LOGIN" | "SIGN";
198
198
  themeSetting: import('./interfaces').IThemeSetting;
199
199
  setThemeSetting: (data: SysConfigResponse) => void;
@@ -216,7 +216,7 @@ export declare const usePlatformConfigStore: import('pinia').StoreDefinition<"pl
216
216
  height: number;
217
217
  };
218
218
  postWatermarkSetting: () => Promise<void>;
219
- setWatermarkSetting: (data: SysConfigResponse) => void;
219
+ setWatermarkSetting: (data: IObject | undefined) => void;
220
220
  projectSetting: {};
221
221
  setProjectConfig: (config: {}) => void;
222
222
  init: () => Promise<void>;
@@ -1,10 +1,9 @@
1
- import { SysConfigResponse } from '@gct-paas/api/platform';
2
1
  import { DeployModeEnum } from './enums/deploy.enum';
3
2
  /**
4
3
  * 设置部署配置信息
5
4
  * @param data - 系统配置响应数据
6
5
  */
7
- declare function setDeploySetting(data: SysConfigResponse): void;
6
+ declare function setDeploySetting(data: IObject | undefined): void;
8
7
  /**
9
8
  * 部署设置 Composable 函数
10
9
  * @returns 返回部署设置相关的响应式数据和方法
@@ -1,6 +1,10 @@
1
1
  import { DeployModeEnum } from "./enums/deploy.enum.mjs";
2
2
  import { computed, reactive } from "vue";
3
3
  //#region src/modules/platform-config/useDeploySetting.ts
4
+ /**
5
+ * 部署设置 Composable
6
+ * 用于管理应用的部署模式配置
7
+ */
4
8
  /** 部署设置响应式对象 */
5
9
  var deploySetting = reactive({ deployMode: DeployModeEnum.STANDARD });
6
10
  /** 是否为独立应用部署模式的计算属性 */
@@ -12,10 +16,9 @@ var isIndependentApp = computed(() => {
12
16
  * @param data - 系统配置响应数据
13
17
  */
14
18
  function setDeploySetting(data) {
15
- const { value } = data;
16
- if (!value) return;
19
+ if (!data || !data.id) return;
17
20
  try {
18
- Object.assign(deploySetting, JSON.parse(value));
21
+ Object.assign(deploySetting, data);
19
22
  } catch (err) {
20
23
  console.warn(err);
21
24
  }
@@ -1,4 +1,4 @@
1
- import { AuthConfig, SysConfigResponse } from '@gct-paas/api/platform';
1
+ import { AuthConfig } from '@gct-paas/api/platform';
2
2
  /**
3
3
  * 登录设置 Composable 函数
4
4
  * @returns 返回登录设置相关的响应式数据和方法
@@ -6,7 +6,7 @@ import { AuthConfig, SysConfigResponse } from '@gct-paas/api/platform';
6
6
  export declare function useLoginSetting(): {
7
7
  loginSetting: AuthConfig;
8
8
  postLoginSetting: () => Promise<void>;
9
- setLoginSetting: (config: SysConfigResponse | undefined) => void;
9
+ setLoginSetting: (config: IObject | undefined) => void;
10
10
  loginModeAuthTypes: import('vue').Ref<string[], string[]>;
11
11
  openIDOAuthAuthTypes: import('vue').Ref<string[], string[]>;
12
12
  sysLoginSort: import('vue').Ref<IObject[], IObject[]>;
@@ -106,39 +106,37 @@ function useLoginSetting() {
106
106
  * @param config - 系统配置响应数据
107
107
  */
108
108
  const setLoginSetting = (config) => {
109
- if (config && config.value) {
110
- const value = JSON.parse(config.value);
111
- for (const k in value) if (k in loginSetting) loginSetting[k] = value[k];
112
- if (has(value, "sortJson") && !isEmpty(value.sortJson)) {
113
- const sortObj = JSON.parse(value.sortJson);
114
- if (has(sortObj, LoginSortTypeEnum.SYSTEM)) sysLoginSort.value = getLoginTypeOptions(sortObj[LoginSortTypeEnum.SYSTEM]);
115
- if (has(sortObj, LoginSortTypeEnum.THIRD_PARTY)) openIDOAuthAuthSort.value = getLoginTypeOptions(sortObj[LoginSortTypeEnum.THIRD_PARTY]);
116
- }
117
- loginSetting.loginModeConfigs?.forEach((item) => {
118
- loginModeConfig.set(item.authType, {
119
- ...item,
120
- enabled: 0
121
- });
109
+ if (!config || !config.id) return;
110
+ for (const k in config) if (k in loginSetting) loginSetting[k] = config[k];
111
+ if (has(config, "sortJson") && !isEmpty(config.sortJson)) {
112
+ const sortObj = JSON.parse(config.sortJson);
113
+ if (has(sortObj, LoginSortTypeEnum.SYSTEM)) sysLoginSort.value = getLoginTypeOptions(sortObj[LoginSortTypeEnum.SYSTEM]);
114
+ if (has(sortObj, LoginSortTypeEnum.THIRD_PARTY)) openIDOAuthAuthSort.value = getLoginTypeOptions(sortObj[LoginSortTypeEnum.THIRD_PARTY]);
115
+ }
116
+ loginSetting.loginModeConfigs?.forEach((item) => {
117
+ loginModeConfig.set(item.authType, {
118
+ ...item,
119
+ enabled: 0
122
120
  });
123
- const loginModeConfigs = loginSetting.loginModeConfigs?.filter((item) => {
124
- return item.enabled;
125
- }).map((i) => {
126
- return i.authType;
127
- }) || [];
128
- loginModeConfigs.push(LoginTypeEnum.ACCOUNT);
129
- loginModeAuthTypes.value = [...new Set(loginModeConfigs)];
130
- loginSetting.openIDOAuthConfigs?.forEach((item) => {
131
- loginModeConfig.set(item.authType, {
132
- ...item,
133
- enabled: 0
134
- });
121
+ });
122
+ const loginModeConfigs = loginSetting.loginModeConfigs?.filter((item) => {
123
+ return item.enabled;
124
+ }).map((i) => {
125
+ return i.authType;
126
+ }) || [];
127
+ loginModeConfigs.push(LoginTypeEnum.ACCOUNT);
128
+ loginModeAuthTypes.value = [...new Set(loginModeConfigs)];
129
+ loginSetting.openIDOAuthConfigs?.forEach((item) => {
130
+ loginModeConfig.set(item.authType, {
131
+ ...item,
132
+ enabled: 0
135
133
  });
136
- openIDOAuthAuthTypes.value = loginSetting.openIDOAuthConfigs?.filter((item) => {
137
- return item.enabled;
138
- }).map((i) => {
139
- return i.authType;
140
- }) || [];
141
- }
134
+ });
135
+ openIDOAuthAuthTypes.value = loginSetting.openIDOAuthConfigs?.filter((item) => {
136
+ return item.enabled;
137
+ }).map((i) => {
138
+ return i.authType;
139
+ }) || [];
142
140
  };
143
141
  return {
144
142
  loginSetting,
@@ -1,4 +1,4 @@
1
- import { OrgConfig, SysConfigResponse } from '@gct-paas/api/platform';
1
+ import { OrgConfig } from '@gct-paas/api/platform';
2
2
  /**
3
3
  * 组织设置 Composable 函数
4
4
  * @param isPlatform - 是否为平台模式,默认为 true
@@ -6,7 +6,7 @@ import { OrgConfig, SysConfigResponse } from '@gct-paas/api/platform';
6
6
  */
7
7
  export declare function useOrgSetting(isPlatform?: boolean): {
8
8
  orgSetting: OrgConfig;
9
- setOrgSetting: (data: SysConfigResponse) => void;
9
+ setOrgSetting: (data: IObject) => void;
10
10
  postOrgSetting: () => Promise<void>;
11
11
  relationFields: import('vue').Ref<{
12
12
  label: string;
@@ -38,19 +38,17 @@ function useOrgSetting(isPlatform = true) {
38
38
  * @param data - 系统配置响应数据
39
39
  */
40
40
  function setOrgSetting(data) {
41
- const { value } = data;
42
- if (!value) return;
41
+ if (!data || !data.id) return;
43
42
  try {
44
- const setting = JSON.parse(value);
45
- for (const key in setting) if (key == "supportLoginFields") setting["supportLoginFields"] = setting["supportLoginFields"].filter((i) => i !== "username_");
46
- Object.assign(orgSetting, setting);
43
+ for (const key in data) if (key == "supportLoginFields") data["supportLoginFields"] = data["supportLoginFields"].filter((i) => i !== "username_");
44
+ Object.assign(orgSetting, data);
47
45
  if (orgSetting.extFieldConfigs && orgSetting.extFieldConfigs.length) orgSetting.extFieldConfigs.forEach((element) => {
48
46
  relationFields.value = relationFields.value.filter((i) => {
49
47
  if (i.value == element.relationField) relationFiledsCopy.value.push(i);
50
48
  return i.value !== element.relationField;
51
49
  });
52
50
  });
53
- orgSetting.extFieldConfigs = JSON.parse(JSON.stringify(setting.extFieldConfigs));
51
+ orgSetting.extFieldConfigs = JSON.parse(JSON.stringify(data.extFieldConfigs));
54
52
  } catch (err) {
55
53
  console.warn(err);
56
54
  }
@@ -1,4 +1,4 @@
1
- import { SecurityConfig, SysConfigResponse } from '@gct-paas/api/platform';
1
+ import { SecurityConfig } from '@gct-paas/api/platform';
2
2
  /**
3
3
  * 安全设置 Composable 函数
4
4
  * @param isPlatform - 是否为平台模式,默认为 true
@@ -7,6 +7,6 @@ import { SecurityConfig, SysConfigResponse } from '@gct-paas/api/platform';
7
7
  export declare function useSecuritySetting(isPlatform?: boolean): {
8
8
  securitySetting: SecurityConfig;
9
9
  postSecuritySetting: () => Promise<void>;
10
- setSecuritySetting: (data: SysConfigResponse) => void;
10
+ setSecuritySetting: (data: IObject | undefined) => void;
11
11
  getSignWay: () => "DOMAIN" | "LOGIN" | "SIGN";
12
12
  };
@@ -54,10 +54,9 @@ function useSecuritySetting(isPlatform = true) {
54
54
  * @param data - 系统配置响应数据
55
55
  */
56
56
  function setSecuritySetting(data) {
57
- const { value } = data;
58
- if (!value) return;
57
+ if (!data || !data.id) return;
59
58
  try {
60
- Object.assign(securitySetting, JSON.parse(value));
59
+ Object.assign(securitySetting, data);
61
60
  } catch (err) {
62
61
  console.warn(err);
63
62
  }
@@ -1,4 +1,7 @@
1
- import { SysConfigResponse } from '@gct-paas/api/platform';
1
+ /**
2
+ * 水印设置 Composable
3
+ * 用于管理平台的水印配置
4
+ */
2
5
  /**
3
6
  * 水印设置 Composable 函数
4
7
  * @returns 返回水印设置相关的响应式数据和方法
@@ -17,5 +20,5 @@ export declare function useWatermarkSetting(): {
17
20
  height: number;
18
21
  };
19
22
  postWatermarkSetting: () => Promise<void>;
20
- setWatermarkSetting: (data: SysConfigResponse) => void;
23
+ setWatermarkSetting: (data: IObject | undefined) => void;
21
24
  };
@@ -22,10 +22,9 @@ function useWatermarkSetting() {
22
22
  * @param data - 系统配置响应数据
23
23
  */
24
24
  function setWatermarkSetting(data) {
25
- const { value } = data;
26
- if (!value) return;
25
+ if (!data || !data.id) return;
27
26
  try {
28
- Object.assign(watermarkSetting, JSON.parse(value));
27
+ Object.assign(watermarkSetting, data);
29
28
  } catch (err) {
30
29
  console.warn(err);
31
30
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gct-paas/core",
3
- "version": "0.1.6-dev.19",
3
+ "version": "0.1.6-dev.20",
4
4
  "type": "module",
5
5
  "description": "paas 平台核心包",
6
6
  "loader": "dist/index.esm.min.js",