You need to sign in or sign up before continuing.
|
@@ -13,10 +13,12 @@ VITE_PUBLIC_PATH = / |
|
@@ -13,10 +13,12 @@ VITE_PUBLIC_PATH = / |
13
|
# 线上演示环境
|
13
|
# 线上演示环境
|
14
|
# VITE_PROXY = [["/api","http://101.133.234.90:8080/api"]]
|
14
|
# VITE_PROXY = [["/api","http://101.133.234.90:8080/api"]]
|
15
|
# 线上测试环境
|
15
|
# 线上测试环境
|
16
|
-VITE_PROXY = [["/api","http://localhost:8080/api"],["/thingskit-drawio","http://localhost:3000/"]]
|
16
|
+# VITE_PROXY = [["/api","http://localhost:8080/api"],["/thingskit-drawio","http://localhost:3000/"]]
|
|
|
17
|
+VITE_PROXY = [["/api","https://dev.thingskit.com/api"],["/thingskit-drawio","http://localhost:3000/"]]
|
17
|
|
18
|
|
18
|
# 实时数据的ws地址
|
19
|
# 实时数据的ws地址
|
19
|
-VITE_WEB_SOCKET = ws://localhost:8080/api/ws/plugins/telemetry?token=
|
20
|
+# VITE_WEB_SOCKET = ws://localhost:8080/api/ws/plugins/telemetry?token=
|
|
|
21
|
+VITE_WEB_SOCKET = ws://44.99.141.212:8080/api/ws/plugins/telemetry?token=
|
20
|
|
22
|
|
21
|
# Delete console
|
23
|
# Delete console
|
22
|
VITE_DROP_CONSOLE = true
|
24
|
VITE_DROP_CONSOLE = true
|
|
@@ -32,3 +34,6 @@ VITE_GLOB_API_URL_PREFIX=/yt |
|
@@ -32,3 +34,6 @@ VITE_GLOB_API_URL_PREFIX=/yt |
32
|
|
34
|
|
33
|
#configuration
|
35
|
#configuration
|
34
|
VITE_GLOB_CONFIGURATION = /thingskit-drawio
|
36
|
VITE_GLOB_CONFIGURATION = /thingskit-drawio
|
|
|
37
|
+
|
|
|
38
|
+#是否是测试环境
|
|
|
39
|
+VITE_IS_DEV = true |
|
@@ -39,3 +39,6 @@ VITE_WEB_SOCKET = ws://47.99.141.212:8080/api/ws/plugins/telemetry?token= |
|
@@ -39,3 +39,6 @@ VITE_WEB_SOCKET = ws://47.99.141.212:8080/api/ws/plugins/telemetry?token= |
39
|
|
39
|
|
40
|
#configuration
|
40
|
#configuration
|
41
|
VITE_GLOB_CONFIGURATION = http://localhost:3000
|
41
|
VITE_GLOB_CONFIGURATION = http://localhost:3000
|
|
|
42
|
+
|
|
|
43
|
+#是否是测试环境
|
|
|
44
|
+VITE_IS_DEV = false |
|
@@ -29,6 +29,7 @@ export function getAppEnvConfig() { |
|
@@ -29,6 +29,7 @@ export function getAppEnvConfig() { |
29
|
VITE_GLOB_API_URL_PREFIX,
|
29
|
VITE_GLOB_API_URL_PREFIX,
|
30
|
VITE_GLOB_UPLOAD_URL,
|
30
|
VITE_GLOB_UPLOAD_URL,
|
31
|
VITE_GLOB_CONFIGURATION,
|
31
|
VITE_GLOB_CONFIGURATION,
|
|
|
32
|
+ VITE_IS_DEV,
|
32
|
} = ENV;
|
33
|
} = ENV;
|
33
|
|
34
|
|
34
|
if (!/^[a-zA-Z\_]*$/.test(VITE_GLOB_APP_SHORT_NAME)) {
|
35
|
if (!/^[a-zA-Z\_]*$/.test(VITE_GLOB_APP_SHORT_NAME)) {
|
|
@@ -44,6 +45,7 @@ export function getAppEnvConfig() { |
|
@@ -44,6 +45,7 @@ export function getAppEnvConfig() { |
44
|
VITE_GLOB_API_URL_PREFIX,
|
45
|
VITE_GLOB_API_URL_PREFIX,
|
45
|
VITE_GLOB_UPLOAD_URL,
|
46
|
VITE_GLOB_UPLOAD_URL,
|
46
|
VITE_GLOB_CONFIGURATION,
|
47
|
VITE_GLOB_CONFIGURATION,
|
|
|
48
|
+ VITE_IS_DEV: JSON.parse(VITE_IS_DEV),
|
47
|
};
|
49
|
};
|
48
|
}
|
50
|
}
|
49
|
|
51
|
|
|
@@ -94,7 +94,7 @@ |
|
@@ -94,7 +94,7 @@ |
94
|
Authority,
|
94
|
Authority,
|
95
|
},
|
95
|
},
|
96
|
setup() {
|
96
|
setup() {
|
97
|
- const { VITE_GLOB_CONFIGURATION } = getAppEnvConfig();
|
97
|
+ const { VITE_GLOB_CONFIGURATION, VITE_IS_DEV } = getAppEnvConfig();
|
98
|
const searchInfo = reactive<Recordable>({});
|
98
|
const searchInfo = reactive<Recordable>({});
|
99
|
const { organizationIdTreeRef, resetFn } = useResetOrganizationTree(searchInfo);
|
99
|
const { organizationIdTreeRef, resetFn } = useResetOrganizationTree(searchInfo);
|
100
|
// 表格hooks
|
100
|
// 表格hooks
|
|
@@ -157,10 +157,18 @@ |
|
@@ -157,10 +157,18 @@ |
157
|
};
|
157
|
};
|
158
|
|
158
|
|
159
|
const handlePreview = (record: Recordable | null) => {
|
159
|
const handlePreview = (record: Recordable | null) => {
|
160
|
- window.open(`${VITE_GLOB_CONFIGURATION}/?dev=1&configurationId=${record!.id}&lightbox=1`);
|
160
|
+ window.open(
|
|
|
161
|
+ `${VITE_GLOB_CONFIGURATION}/${VITE_IS_DEV ? '?dev=1&' : '?'}configurationId=${
|
|
|
162
|
+ record!.id
|
|
|
163
|
+ }&lightbox=1`
|
|
|
164
|
+ );
|
161
|
};
|
165
|
};
|
162
|
const handleDesign = (record: Recordable | null) => {
|
166
|
const handleDesign = (record: Recordable | null) => {
|
163
|
- window.open(VITE_GLOB_CONFIGURATION + '/?dev=1&configurationId=' + record!.id, '_blank');
|
167
|
+ window.open(
|
|
|
168
|
+ `${VITE_GLOB_CONFIGURATION}/${VITE_IS_DEV ? '?dev=1&' : '?'}&configurationId=${
|
|
|
169
|
+ record!.id
|
|
|
170
|
+ }`
|
|
|
171
|
+ );
|
164
|
};
|
172
|
};
|
165
|
return {
|
173
|
return {
|
166
|
searchInfo,
|
174
|
searchInfo,
|
|
@@ -160,4 +160,6 @@ export interface GlobEnvConfig { |
|
@@ -160,4 +160,6 @@ export interface GlobEnvConfig { |
160
|
VITE_GLOB_UPLOAD_URL?: string;
|
160
|
VITE_GLOB_UPLOAD_URL?: string;
|
161
|
//configuration
|
161
|
//configuration
|
162
|
VITE_GLOB_CONFIGURATION: string;
|
162
|
VITE_GLOB_CONFIGURATION: string;
|
|
|
163
|
+ // is dev
|
|
|
164
|
+ VITE_IS_DEV: string;
|
163
|
} |
165
|
} |