vue2-client 1.2.84 → 1.2.85
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/CHANGELOG.md +1 -1
- package/package.json +94 -94
- package/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox.vue +225 -225
- package/src/base-client/components/common/AmapMarker/index.js +3 -3
- package/src/base-client/components/common/ScrollList/SrcollList.vue +113 -113
- package/src/base-client/components/common/ScrollList/index.js +3 -3
- package/src/base-client/components/common/XTable/XTable.vue +269 -269
- package/src/base-client/components/iot/DeviceDetailsView/DeviceDetailsView.vue +232 -232
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsCount.vue +678 -678
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsException.vue +57 -57
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsRead.vue +131 -131
- package/src/base-client/components/iot/DeviceTypeDetailsView/DeviceTypeDetailsView.vue +300 -300
- package/src/base-client/components/iot/WebmeterAnalysisView/WebmeterAnalysisView.vue +770 -770
- package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +532 -532
- package/src/base-client/plugins/AppData.js +0 -2
- package/src/base-client/plugins/compatible/LoginServiceOA.js +20 -20
- package/src/pages/login/Login.vue +2 -2
- package/src/pages/resourceManage/orgListManage.vue +98 -98
- package/src/router/async/config.async.js +26 -26
- package/src/router/index.js +27 -27
- package/src/services/api/WebmeterAnalysisViewApi.js +20 -20
- package/src/services/api/index.js +39 -39
- package/src/services/api/iot/DeviceDetailsView/DeviceDetailsCountApi.js +18 -18
- package/src/theme/default/style.less +47 -47
- package/src/utils/map-utils.js +31 -31
- package/src/utils/request.js +13 -4
package/src/utils/map-utils.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import AMapLoader from '@amap/amap-jsapi-loader'
|
|
2
|
-
let Amap
|
|
3
|
-
async function GetGDMap () {
|
|
4
|
-
if (!Amap) {
|
|
5
|
-
window._AMapSecurityConfig = {
|
|
6
|
-
securityJsCode:'275e59edb26ab1f917cfe7f05bea7979'
|
|
7
|
-
}
|
|
8
|
-
Amap = await AMapLoader.load({
|
|
9
|
-
key: '55a4807a6fc3adca5510f69578b1ae4a', // 申请好的Web端开发者Key,首次调用 load 时必填
|
|
10
|
-
version: '1.4.2', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
|
|
11
|
-
plugins: ['AMap.ToolBar', 'AMap.Geolocation', 'AMap.Geocoder', 'AMap.MarkerClusterer', 'AMap.Autocomplete'], // 需要使用的的插件列表,如比例尺'AMap.Scale'等
|
|
12
|
-
})
|
|
13
|
-
}
|
|
14
|
-
return Amap
|
|
15
|
-
}
|
|
16
|
-
async function GetLocation (address) {
|
|
17
|
-
return new Promise(async (resolve, reject) => {
|
|
18
|
-
new (await GetGDMap()).Geocoder({
|
|
19
|
-
radius: 500 // 范围,默认:500
|
|
20
|
-
}).getLocation(address, function (status, result) {
|
|
21
|
-
console.log(result)
|
|
22
|
-
if (status === 'complete' && result.geocodes.length) {
|
|
23
|
-
resolve({ lng: result.geocodes[0].location.lng, lat: result.geocodes[0].location.lat })
|
|
24
|
-
} else {
|
|
25
|
-
// eslint-disable-next-line prefer-promise-reject-errors
|
|
26
|
-
reject('根据经纬度查询地址失败')
|
|
27
|
-
}
|
|
28
|
-
})
|
|
29
|
-
})
|
|
30
|
-
}
|
|
31
|
-
export { GetGDMap, GetLocation }
|
|
1
|
+
import AMapLoader from '@amap/amap-jsapi-loader'
|
|
2
|
+
let Amap
|
|
3
|
+
async function GetGDMap () {
|
|
4
|
+
if (!Amap) {
|
|
5
|
+
window._AMapSecurityConfig = {
|
|
6
|
+
securityJsCode:'275e59edb26ab1f917cfe7f05bea7979'
|
|
7
|
+
}
|
|
8
|
+
Amap = await AMapLoader.load({
|
|
9
|
+
key: '55a4807a6fc3adca5510f69578b1ae4a', // 申请好的Web端开发者Key,首次调用 load 时必填
|
|
10
|
+
version: '1.4.2', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
|
|
11
|
+
plugins: ['AMap.ToolBar', 'AMap.Geolocation', 'AMap.Geocoder', 'AMap.MarkerClusterer', 'AMap.Autocomplete'], // 需要使用的的插件列表,如比例尺'AMap.Scale'等
|
|
12
|
+
})
|
|
13
|
+
}
|
|
14
|
+
return Amap
|
|
15
|
+
}
|
|
16
|
+
async function GetLocation (address) {
|
|
17
|
+
return new Promise(async (resolve, reject) => {
|
|
18
|
+
new (await GetGDMap()).Geocoder({
|
|
19
|
+
radius: 500 // 范围,默认:500
|
|
20
|
+
}).getLocation(address, function (status, result) {
|
|
21
|
+
console.log(result)
|
|
22
|
+
if (status === 'complete' && result.geocodes.length) {
|
|
23
|
+
resolve({ lng: result.geocodes[0].location.lng, lat: result.geocodes[0].location.lat })
|
|
24
|
+
} else {
|
|
25
|
+
// eslint-disable-next-line prefer-promise-reject-errors
|
|
26
|
+
reject('根据经纬度查询地址失败')
|
|
27
|
+
}
|
|
28
|
+
})
|
|
29
|
+
})
|
|
30
|
+
}
|
|
31
|
+
export { GetGDMap, GetLocation }
|
package/src/utils/request.js
CHANGED
|
@@ -171,7 +171,16 @@ function loadInterceptors () {
|
|
|
171
171
|
}, errorHandler)
|
|
172
172
|
// 加载响应拦截器
|
|
173
173
|
axios.interceptors.response.use((response) => {
|
|
174
|
-
|
|
174
|
+
// 判断是否为V4环境
|
|
175
|
+
if (setting.compatible === 'V4') {
|
|
176
|
+
if (response.data.data) {
|
|
177
|
+
return response.data.data
|
|
178
|
+
} else {
|
|
179
|
+
return response.data
|
|
180
|
+
}
|
|
181
|
+
} else {
|
|
182
|
+
return response.data
|
|
183
|
+
}
|
|
175
184
|
}, errorHandler)
|
|
176
185
|
}
|
|
177
186
|
|
|
@@ -181,12 +190,12 @@ const errorHandler = (error) => {
|
|
|
181
190
|
const data = error.response.data
|
|
182
191
|
// 从 localstorage 获取 token
|
|
183
192
|
const token = localStorage.getItem(ACCESS_TOKEN)
|
|
184
|
-
if (error.response.status === 403) {
|
|
193
|
+
if (error.response.status === 403 || data.code === 403) {
|
|
185
194
|
notification.error({
|
|
186
195
|
message: '禁止访问',
|
|
187
196
|
description: data
|
|
188
197
|
})
|
|
189
|
-
} else if (error.response.status === 401 && !(data.result && data.result.isLogin)) {
|
|
198
|
+
} else if ((error.response.status === 401 || data.code === 401) && !(data.result && data.result.isLogin)) {
|
|
190
199
|
notification.error({
|
|
191
200
|
message: '鉴权失败',
|
|
192
201
|
description: data
|
|
@@ -198,7 +207,7 @@ const errorHandler = (error) => {
|
|
|
198
207
|
}, 1500)
|
|
199
208
|
})
|
|
200
209
|
}
|
|
201
|
-
} else if (error.response.status === 500) {
|
|
210
|
+
} else if (error.response.status === 500 || data.code === 500) {
|
|
202
211
|
notification.error({
|
|
203
212
|
message: '系统异常',
|
|
204
213
|
description: data
|