vue2-client 1.16.27 → 1.16.29
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.
- package/package.json +112 -112
- package/src/base-client/components/common/HIS/HForm/HForm.vue +1 -1
- package/src/base-client/components/common/Upload/Upload.vue +333 -333
- package/src/base-client/components/common/XForm/XFormItem.vue +1504 -1504
- package/src/base-client/components/common/XFormTable/demo.vue +16 -45
- package/src/base-client/components/common/XReport/print.js +186 -186
- package/src/base-client/components/common/XReportGrid/XReportTrGroup.vue +4 -1
- package/src/components/FileImageItem/FileItem.vue +320 -320
- package/src/pages/WorkflowDetail/WorkflowPageDetail/WorkFlowHandle.vue +1766 -1766
- package/src/router/guards.js +7 -2
- package/src/services/api/common.js +4 -0
- package/src/utils/map-utils.js +47 -47
package/src/router/guards.js
CHANGED
@@ -11,6 +11,7 @@ import AES from '@vue2-client/utils/EncryptUtil'
|
|
11
11
|
import Vue from 'vue'
|
12
12
|
import { funcToRouter, loadRoutes } from '@vue2-client/utils/routerUtil'
|
13
13
|
import { indexedDB } from '@vue2-client/utils/indexedDB'
|
14
|
+
import { microDispatch } from '@vue2-client/utils/microAppUtils'
|
14
15
|
|
15
16
|
NProgress.configure({ showSpinner: false })
|
16
17
|
|
@@ -191,7 +192,7 @@ const loginGuard = (to, form, next, options) => {
|
|
191
192
|
// next({ path: '/login' })
|
192
193
|
// })
|
193
194
|
// } else {
|
194
|
-
|
195
|
+
next()
|
195
196
|
// }
|
196
197
|
}
|
197
198
|
}
|
@@ -256,7 +257,11 @@ const progressDone = () => {
|
|
256
257
|
NProgress.done()
|
257
258
|
}
|
258
259
|
|
260
|
+
const microAppGuard = () => {
|
261
|
+
microDispatch({ type: 'microMounted', appName: window.__MICRO_APP_NAME__ })
|
262
|
+
}
|
263
|
+
|
259
264
|
export default {
|
260
265
|
beforeEach: [progressStart, loginGuard, authorityGuard, redirectGuard],
|
261
|
-
afterEach: [progressDone],
|
266
|
+
afterEach: [progressDone, microAppGuard],
|
262
267
|
}
|
@@ -74,6 +74,10 @@ export function getConfig (content, configName, serviceName = process.env.VUE_AP
|
|
74
74
|
if (content) {
|
75
75
|
return content
|
76
76
|
}
|
77
|
+
if (!configName) {
|
78
|
+
message.warning('配置名称不能为空')
|
79
|
+
return '配置名称不能为空'
|
80
|
+
}
|
77
81
|
let apiPre = '/api/'
|
78
82
|
if (isDev) {
|
79
83
|
apiPre = '/devApi/'
|
package/src/utils/map-utils.js
CHANGED
@@ -1,47 +1,47 @@
|
|
1
|
-
import AMapLoader from '@amap/amap-jsapi-loader'
|
2
|
-
let Amap
|
3
|
-
async function GetGDMap (secretKey, key) {
|
4
|
-
if (!Amap) {
|
5
|
-
window._AMapSecurityConfig = {
|
6
|
-
securityJsCode: secretKey
|
7
|
-
}
|
8
|
-
// 解决高德地图加载报错 ---> 禁止多种API加载方式混用
|
9
|
-
AMapLoader.reset()
|
10
|
-
Amap = await AMapLoader.load({
|
11
|
-
key: key, // 申请好的Web端开发者Key,首次调用 load 时必填
|
12
|
-
version: '2.0', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
|
13
|
-
plugins: ['AMap.IndexCluster', 'AMP.MarkerCluster', 'AMap.InfoWindow', 'AMap.HeatMap', 'AMap.HawkEye', 'AMap.DistrictSearch',
|
14
|
-
'AMap.ToolBar', 'AMap.Geolocation', 'AMap.MouseTool',
|
15
|
-
'AMap.Geocoder', 'AMap.MarkerClusterer', 'AMap.AutoComplete', 'AMap.Scale'], // 需要使用的的插件列表,如比例尺'AMap.Scale'等
|
16
|
-
AMapUI: {
|
17
|
-
version: '1.1', // AMapUI 缺省 1.1
|
18
|
-
plugins: ['misc/PositionPicker'] // 需要加载的 AMapUI ui插件
|
19
|
-
}
|
20
|
-
})
|
21
|
-
}
|
22
|
-
return Amap
|
23
|
-
}
|
24
|
-
|
25
|
-
async function getGDMap (address) {
|
26
|
-
new (await GetGDMap()).Geocoder({
|
27
|
-
radius: 500 // 范围,默认:500
|
28
|
-
}).getLocation(address, function (status, result) {
|
29
|
-
if (status === 'complete' && result.geocodes.length) {
|
30
|
-
return ({ lng: result.geocodes[0].location.lng, lat: result.geocodes[0].location.lat })
|
31
|
-
} else {
|
32
|
-
// eslint-disable-next-line prefer-promise-reject-errors
|
33
|
-
throw new Error('根据经纬度查询地址失败')
|
34
|
-
}
|
35
|
-
})
|
36
|
-
}
|
37
|
-
|
38
|
-
async function GetLocation (address) {
|
39
|
-
return new Promise((resolve, reject) => {
|
40
|
-
try {
|
41
|
-
resolve(getGDMap(address))
|
42
|
-
} catch (e) {
|
43
|
-
reject(e)
|
44
|
-
}
|
45
|
-
})
|
46
|
-
}
|
47
|
-
export { GetGDMap, GetLocation }
|
1
|
+
import AMapLoader from '@amap/amap-jsapi-loader'
|
2
|
+
let Amap
|
3
|
+
async function GetGDMap (secretKey, key) {
|
4
|
+
if (!Amap) {
|
5
|
+
window._AMapSecurityConfig = {
|
6
|
+
securityJsCode: secretKey
|
7
|
+
}
|
8
|
+
// 解决高德地图加载报错 ---> 禁止多种API加载方式混用
|
9
|
+
AMapLoader.reset()
|
10
|
+
Amap = await AMapLoader.load({
|
11
|
+
key: key, // 申请好的Web端开发者Key,首次调用 load 时必填
|
12
|
+
version: '2.0', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
|
13
|
+
plugins: ['AMap.IndexCluster', 'AMP.MarkerCluster', 'AMap.InfoWindow', 'AMap.HeatMap', 'AMap.HawkEye', 'AMap.DistrictSearch',
|
14
|
+
'AMap.ToolBar', 'AMap.Geolocation', 'AMap.MouseTool',
|
15
|
+
'AMap.Geocoder', 'AMap.MarkerClusterer', 'AMap.AutoComplete', 'AMap.Scale'], // 需要使用的的插件列表,如比例尺'AMap.Scale'等
|
16
|
+
AMapUI: {
|
17
|
+
version: '1.1', // AMapUI 缺省 1.1
|
18
|
+
plugins: ['misc/PositionPicker'] // 需要加载的 AMapUI ui插件
|
19
|
+
}
|
20
|
+
})
|
21
|
+
}
|
22
|
+
return Amap
|
23
|
+
}
|
24
|
+
|
25
|
+
async function getGDMap (address) {
|
26
|
+
new (await GetGDMap()).Geocoder({
|
27
|
+
radius: 500 // 范围,默认:500
|
28
|
+
}).getLocation(address, function (status, result) {
|
29
|
+
if (status === 'complete' && result.geocodes.length) {
|
30
|
+
return ({ lng: result.geocodes[0].location.lng, lat: result.geocodes[0].location.lat })
|
31
|
+
} else {
|
32
|
+
// eslint-disable-next-line prefer-promise-reject-errors
|
33
|
+
throw new Error('根据经纬度查询地址失败')
|
34
|
+
}
|
35
|
+
})
|
36
|
+
}
|
37
|
+
|
38
|
+
async function GetLocation (address) {
|
39
|
+
return new Promise((resolve, reject) => {
|
40
|
+
try {
|
41
|
+
resolve(getGDMap(address))
|
42
|
+
} catch (e) {
|
43
|
+
reject(e)
|
44
|
+
}
|
45
|
+
})
|
46
|
+
}
|
47
|
+
export { GetGDMap, GetLocation }
|