@gct-paas/core 6.2.0-dev.0 → 6.2.0-dev.1

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 v6.1.0 */
1
+ /*! @gct-paas/core v6.2.0-dev.0 */
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};
@@ -19,6 +19,10 @@ export declare enum DefaultDateTypeConst {
19
19
  * 近N天
20
20
  */
21
21
  PastDays = "past-days",
22
+ /**
23
+ * 未来N天
24
+ */
25
+ FutureDays = "future-days",
22
26
  /**
23
27
  * 本周
24
28
  */
@@ -21,6 +21,10 @@ var DefaultDateTypeConst = /* @__PURE__ */ function(DefaultDateTypeConst) {
21
21
  */
22
22
  DefaultDateTypeConst["PastDays"] = "past-days";
23
23
  /**
24
+ * 未来N天
25
+ */
26
+ DefaultDateTypeConst["FutureDays"] = "future-days";
27
+ /**
24
28
  * 本周
25
29
  */
26
30
  DefaultDateTypeConst["ThisWeek"] = "this-week";
@@ -97,6 +97,7 @@ var GctGlobal = class {
97
97
  /**初始化i18n */
98
98
  await this.store.init();
99
99
  await this.env.checkIsTestEnv();
100
+ await this.env.checkBranch();
100
101
  await this.i18nUtil.init();
101
102
  }
102
103
  };
@@ -52,6 +52,7 @@ export declare class EnvironmentManager implements IEnvironmentManager {
52
52
  * 检测是否为测试环境
53
53
  */
54
54
  checkIsTestEnv(): Promise<void>;
55
+ checkBranch(): Promise<void>;
55
56
  /**
56
57
  * 获取当前环境类型
57
58
  * @returns 环境类型
@@ -35,6 +35,12 @@ export interface IEnvironmentManager {
35
35
  * @param loadTenant 是否加载租户信息
36
36
  */
37
37
  checkIsTestEnv(loadTenant?: boolean): Promise<void>;
38
+ /**
39
+ * 检查分支信息,如果是 dev 环境时,aid 存在的情况下,未指定分支去后台获取默认分支
40
+ *
41
+ * @return {*} {Promise<void>}
42
+ */
43
+ checkBranch(): Promise<void>;
38
44
  /**
39
45
  * 获取当前环境类型
40
46
  * @returns 环境类型
@@ -94,6 +94,15 @@ var EnvironmentManager = class {
94
94
  }
95
95
  if (this._testEnv) await _gct.store.setContext({ env: EnvironmentType.TEST });
96
96
  }
97
+ async checkBranch() {
98
+ if (_gct.store.context.aid && !_gct.store.context.bid && _gct.store.context.env === EnvironmentType.DEV) try {
99
+ const defaultBranch = (await _api.apaas.appBranch.getList()).find((item) => item.head === 1);
100
+ if (defaultBranch) _gct.store.setContext({ bid: defaultBranch.id });
101
+ else console.warn("未找到默认分支,请检查后台配置");
102
+ } catch (error) {
103
+ console.error("获取默认分支失败", error);
104
+ }
105
+ }
97
106
  /**
98
107
  * 获取当前环境类型
99
108
  * @returns 环境类型
@@ -38,7 +38,9 @@ export declare const useUserStore: import('pinia').StoreDefinition<"user", UserS
38
38
  signType?: string | undefined;
39
39
  signWay?: string | undefined;
40
40
  signatureImage?: string | undefined;
41
+ signatureImageVertical?: string | undefined;
41
42
  signatureImageWrite?: string | undefined;
43
+ signatureImageWriteVertical?: string | undefined;
42
44
  suiteTicket?: string | undefined;
43
45
  telephone?: string | undefined;
44
46
  tenantList?: {
@@ -111,7 +113,9 @@ export declare const useUserStore: import('pinia').StoreDefinition<"user", UserS
111
113
  signType?: string | undefined;
112
114
  signWay?: string | undefined;
113
115
  signatureImage?: string | undefined;
116
+ signatureImageVertical?: string | undefined;
114
117
  signatureImageWrite?: string | undefined;
118
+ signatureImageWriteVertical?: string | undefined;
115
119
  suiteTicket?: string | undefined;
116
120
  telephone?: string | undefined;
117
121
  tenantList?: {
@@ -181,7 +185,9 @@ export declare const useUserStore: import('pinia').StoreDefinition<"user", UserS
181
185
  signType?: string | undefined;
182
186
  signWay?: string | undefined;
183
187
  signatureImage?: string | undefined;
188
+ signatureImageVertical?: string | undefined;
184
189
  signatureImageWrite?: string | undefined;
190
+ signatureImageWriteVertical?: string | undefined;
185
191
  suiteTicket?: string | undefined;
186
192
  telephone?: string | undefined;
187
193
  tenantList?: {
@@ -257,7 +263,9 @@ export declare const useUserStore: import('pinia').StoreDefinition<"user", UserS
257
263
  signType?: string | undefined;
258
264
  signWay?: string | undefined;
259
265
  signatureImage?: string | undefined;
266
+ signatureImageVertical?: string | undefined;
260
267
  signatureImageWrite?: string | undefined;
268
+ signatureImageWriteVertical?: string | undefined;
261
269
  suiteTicket?: string | undefined;
262
270
  telephone?: string | undefined;
263
271
  tenantList?: {
@@ -53,7 +53,7 @@ function interceptors(axios) {
53
53
  axios.interceptors.response.use((response) => {
54
54
  if (response.data.code === 200) return response;
55
55
  else {
56
- logBusinessError(response);
56
+ if (response.data.code != null) logBusinessError(response);
57
57
  const { errorMessageMode } = response.config || {};
58
58
  const { code, subMessage, message, subCode } = response.data;
59
59
  if (subCode === "sys.global.tenantId.required") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gct-paas/core",
3
- "version": "6.2.0-dev.0",
3
+ "version": "6.2.0-dev.1",
4
4
  "type": "module",
5
5
  "description": "paas 平台核心包",
6
6
  "loader": "dist/index.esm.min.js",