vue2-client 1.2.86 → 1.2.90
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/.env +15 -15
- package/.eslintrc.js +82 -82
- package/CHANGELOG.md +1 -1
- package/package.json +94 -94
- package/src/base-client/components/common/AmapMarker/AmapPointRendering.vue +113 -113
- package/src/base-client/components/common/CitySelect/CitySelect.vue +244 -244
- package/src/base-client/components/common/CitySelect/index.js +3 -3
- package/src/base-client/components/common/CitySelect/index.md +109 -109
- package/src/base-client/components/common/CreateQuery/CreateQuery.vue +539 -539
- package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQuery.vue +310 -310
- package/src/base-client/components/common/Upload/index.js +3 -3
- package/src/base-client/components/common/XAddForm/XAddForm.vue +345 -345
- package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +322 -322
- package/src/base-client/components/common/XForm/XForm.vue +268 -268
- 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 +274 -84
- package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +532 -532
- package/src/base-client/plugins/compatible/LoginServiceOA.js +20 -20
- package/src/pages/CreateQueryPage.vue +59 -58
- package/src/pages/login/Login.vue +55 -51
- package/src/pages/resourceManage/orgListManage.vue +98 -98
- package/src/router/async/config.async.js +26 -26
- package/src/router/async/router.map.js +60 -60
- package/src/router/index.js +27 -27
- package/src/services/api/WebmeterAnalysisViewApi.js +5 -1
- package/src/services/api/common.js +56 -56
- package/src/services/api/index.js +39 -39
- package/src/services/api/iot/DeviceDetailsView/DeviceDetailsCountApi.js +18 -18
- package/src/services/api/manage.js +16 -16
- package/src/services/api/restTools.js +24 -24
- package/src/theme/default/style.less +47 -47
- package/src/utils/request.js +11 -3
- package/src/utils/util.js +222 -222
- package/vue.config.js +158 -153
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
// 视图组件
|
|
2
|
-
const view = {
|
|
3
|
-
tabs: () => import('@vue2-client/layouts/tabs'),
|
|
4
|
-
blank: () => import('@vue2-client/layouts/BlankView'),
|
|
5
|
-
page: () => import('@vue2-client/layouts/PageView')
|
|
6
|
-
}
|
|
7
|
-
// 动态路由对象定义
|
|
8
|
-
const routerResource = {}
|
|
9
|
-
// --------------------------------------基本视图组件--------------------------------------
|
|
10
|
-
// 空白视图
|
|
11
|
-
routerResource.blank = view.blank
|
|
12
|
-
// 单页面视图
|
|
13
|
-
routerResource.singlePage = view.blank
|
|
14
|
-
// --------------------------------------系统配置--------------------------------------
|
|
15
|
-
routerResource.system = view.blank
|
|
16
|
-
// 字典管理
|
|
17
|
-
routerResource.dictionaryManage = () => import(/* webpackChunkName: "dictionary" */ '@vue2-client/pages/system/dictionary')
|
|
18
|
-
// 查询配置管理
|
|
19
|
-
routerResource.queryParamsManage = () => import(/* webpackChunkName: "queryParams" */ '@vue2-client/pages/system/queryParams')
|
|
20
|
-
// 查询配置生成
|
|
21
|
-
routerResource.createQuery = () => import('@vue2-client/pages/CreateQueryPage.vue')
|
|
22
|
-
// 系统问题反馈工单
|
|
23
|
-
routerResource.submitTicket = () => import(/* webpackChunkName: "submitTicket" */ '@vue2-client/pages/system/ticket')
|
|
24
|
-
// --------------------------------------报表组件--------------------------------------
|
|
25
|
-
routerResource.reportTable = () => import(/* webpackChunkName: "ReportTableHome" */ '@vue2-client/pages/report/ReportTableHome')
|
|
26
|
-
// --------------------------------------资源管理--------------------------------------
|
|
27
|
-
routerResource.resourceManageMain = () => import(/* webpackChunkName: "resourceManageMain" */ '@vue2-client/pages/resourceManage/resourceManageMain')
|
|
28
|
-
|
|
29
|
-
// 基础路由组件注册
|
|
30
|
-
const routerMap = {
|
|
31
|
-
login: {
|
|
32
|
-
authority: '*',
|
|
33
|
-
path: '/login',
|
|
34
|
-
component: () => import('@vue2-client/pages/login')
|
|
35
|
-
},
|
|
36
|
-
root: {
|
|
37
|
-
path: '/',
|
|
38
|
-
name: '首页',
|
|
39
|
-
redirect: '/login',
|
|
40
|
-
component: view.tabs
|
|
41
|
-
},
|
|
42
|
-
exp403: {
|
|
43
|
-
authority: '*',
|
|
44
|
-
name: 'exp403',
|
|
45
|
-
path: '403',
|
|
46
|
-
component: () => import('@vue2-client/pages/exception/403')
|
|
47
|
-
},
|
|
48
|
-
exp404: {
|
|
49
|
-
name: 'exp404',
|
|
50
|
-
path: '404',
|
|
51
|
-
component: () => import('@vue2-client/pages/exception/404')
|
|
52
|
-
},
|
|
53
|
-
exp500: {
|
|
54
|
-
name: 'exp500',
|
|
55
|
-
path: '500',
|
|
56
|
-
component: () => import('@vue2-client/pages/exception/500')
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
Object.assign(routerMap, routerResource)
|
|
60
|
-
export default routerMap
|
|
1
|
+
// 视图组件
|
|
2
|
+
const view = {
|
|
3
|
+
tabs: () => import('@vue2-client/layouts/tabs'),
|
|
4
|
+
blank: () => import('@vue2-client/layouts/BlankView'),
|
|
5
|
+
page: () => import('@vue2-client/layouts/PageView')
|
|
6
|
+
}
|
|
7
|
+
// 动态路由对象定义
|
|
8
|
+
const routerResource = {}
|
|
9
|
+
// --------------------------------------基本视图组件--------------------------------------
|
|
10
|
+
// 空白视图
|
|
11
|
+
routerResource.blank = view.blank
|
|
12
|
+
// 单页面视图
|
|
13
|
+
routerResource.singlePage = view.blank
|
|
14
|
+
// --------------------------------------系统配置--------------------------------------
|
|
15
|
+
routerResource.system = view.blank
|
|
16
|
+
// 字典管理
|
|
17
|
+
routerResource.dictionaryManage = () => import(/* webpackChunkName: "dictionary" */ '@vue2-client/pages/system/dictionary')
|
|
18
|
+
// 查询配置管理
|
|
19
|
+
routerResource.queryParamsManage = () => import(/* webpackChunkName: "queryParams" */ '@vue2-client/pages/system/queryParams')
|
|
20
|
+
// 查询配置生成
|
|
21
|
+
routerResource.createQuery = () => import('@vue2-client/pages/CreateQueryPage.vue')
|
|
22
|
+
// 系统问题反馈工单
|
|
23
|
+
routerResource.submitTicket = () => import(/* webpackChunkName: "submitTicket" */ '@vue2-client/pages/system/ticket')
|
|
24
|
+
// --------------------------------------报表组件--------------------------------------
|
|
25
|
+
routerResource.reportTable = () => import(/* webpackChunkName: "ReportTableHome" */ '@vue2-client/pages/report/ReportTableHome')
|
|
26
|
+
// --------------------------------------资源管理--------------------------------------
|
|
27
|
+
routerResource.resourceManageMain = () => import(/* webpackChunkName: "resourceManageMain" */ '@vue2-client/pages/resourceManage/resourceManageMain')
|
|
28
|
+
|
|
29
|
+
// 基础路由组件注册
|
|
30
|
+
const routerMap = {
|
|
31
|
+
login: {
|
|
32
|
+
authority: '*',
|
|
33
|
+
path: '/login',
|
|
34
|
+
component: () => import('@vue2-client/pages/login')
|
|
35
|
+
},
|
|
36
|
+
root: {
|
|
37
|
+
path: '/',
|
|
38
|
+
name: '首页',
|
|
39
|
+
redirect: '/login',
|
|
40
|
+
component: view.tabs
|
|
41
|
+
},
|
|
42
|
+
exp403: {
|
|
43
|
+
authority: '*',
|
|
44
|
+
name: 'exp403',
|
|
45
|
+
path: '403',
|
|
46
|
+
component: () => import('@vue2-client/pages/exception/403')
|
|
47
|
+
},
|
|
48
|
+
exp404: {
|
|
49
|
+
name: 'exp404',
|
|
50
|
+
path: '404',
|
|
51
|
+
component: () => import('@vue2-client/pages/exception/404')
|
|
52
|
+
},
|
|
53
|
+
exp500: {
|
|
54
|
+
name: 'exp500',
|
|
55
|
+
path: '500',
|
|
56
|
+
component: () => import('@vue2-client/pages/exception/500')
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
Object.assign(routerMap, routerResource)
|
|
60
|
+
export default routerMap
|
package/src/router/index.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { formatRoutes } from '@vue2-client/utils/routerUtil'
|
|
2
|
-
|
|
3
|
-
// 不需要登录拦截的路由配置
|
|
4
|
-
const loginIgnore = {
|
|
5
|
-
names: ['404', '403'], // 根据路由名称匹配
|
|
6
|
-
paths: ['/login', '/submitTicket'], // 根据路由fullPath匹配
|
|
7
|
-
/**
|
|
8
|
-
* 判断路由是否包含在该配置中
|
|
9
|
-
* @param route vue-router 的 route 对象
|
|
10
|
-
* @returns {boolean}
|
|
11
|
-
*/
|
|
12
|
-
includes (route) {
|
|
13
|
-
return this.names.includes(route.name) || this.paths.includes(route.path)
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* 初始化路由实例
|
|
19
|
-
* @param isAsync 是否异步路由模式
|
|
20
|
-
* @returns {RouterOptions}
|
|
21
|
-
*/
|
|
22
|
-
function initRouter (isAsync) {
|
|
23
|
-
const options = require('./async/config.async').default
|
|
24
|
-
formatRoutes(options.routes)
|
|
25
|
-
return options
|
|
26
|
-
}
|
|
27
|
-
export { loginIgnore, initRouter }
|
|
1
|
+
import { formatRoutes } from '@vue2-client/utils/routerUtil'
|
|
2
|
+
|
|
3
|
+
// 不需要登录拦截的路由配置
|
|
4
|
+
const loginIgnore = {
|
|
5
|
+
names: ['404', '403'], // 根据路由名称匹配
|
|
6
|
+
paths: ['/login', '/submitTicket'], // 根据路由fullPath匹配
|
|
7
|
+
/**
|
|
8
|
+
* 判断路由是否包含在该配置中
|
|
9
|
+
* @param route vue-router 的 route 对象
|
|
10
|
+
* @returns {boolean}
|
|
11
|
+
*/
|
|
12
|
+
includes (route) {
|
|
13
|
+
return this.names.includes(route.name) || this.paths.includes(route.path)
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* 初始化路由实例
|
|
19
|
+
* @param isAsync 是否异步路由模式
|
|
20
|
+
* @returns {RouterOptions}
|
|
21
|
+
*/
|
|
22
|
+
function initRouter (isAsync) {
|
|
23
|
+
const options = require('./async/config.async').default
|
|
24
|
+
formatRoutes(options.routes)
|
|
25
|
+
return options
|
|
26
|
+
}
|
|
27
|
+
export { loginIgnore, initRouter }
|
|
@@ -14,7 +14,11 @@ const WebmeterAnalysisViewApi = {
|
|
|
14
14
|
// 查询:按表厂抄表量统计
|
|
15
15
|
handMeterSumCountData: '/webmeterapi/foreignaidHandMeterSumCountData',
|
|
16
16
|
// 查询:统计用气量数据
|
|
17
|
-
useGasSumCount: '/webmeterapi/foreignaidUseGasSumCountData'
|
|
17
|
+
useGasSumCount: '/webmeterapi/foreignaidUseGasSumCountData',
|
|
18
|
+
// 查询:按用气性质统计用气量
|
|
19
|
+
GasByGasProperties: '/webmeterapi/foreignaidGasByGasProperties',
|
|
20
|
+
// 查询:用户在用气量占比
|
|
21
|
+
GasInUser: '/webmeterapi/foreignaidGasInUser'
|
|
18
22
|
}
|
|
19
23
|
|
|
20
24
|
export { WebmeterAnalysisViewApi }
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import { METHOD, request } from '@vue2-client/utils/request'
|
|
2
|
-
import { indexedDB } from '@vue2-client/utils/indexedDB'
|
|
3
|
-
|
|
4
|
-
const commonApi = {
|
|
5
|
-
// 获取表格列配置
|
|
6
|
-
getColumnsJson: '/webmeterapi/getColumns',
|
|
7
|
-
// 通用查询
|
|
8
|
-
query: '/webmeterapi/commonQuery',
|
|
9
|
-
// 表单通用查询
|
|
10
|
-
queryWithResource: '/webmeterapi/commonQueryWithResource',
|
|
11
|
-
// 通用新增/修改
|
|
12
|
-
addOrModify: '/webmeterapi/commonAddOrModify',
|
|
13
|
-
// 通用删除
|
|
14
|
-
delete: '/webmeterapi/commonDelete',
|
|
15
|
-
// 获取字典键列表
|
|
16
|
-
getDictionaryParam: '/webmeterapi/getDictionaryParam'
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* 带缓存查询的表格配置文件查询
|
|
21
|
-
* @param queryParamsName 配置名称
|
|
22
|
-
* @param callback 回调函数
|
|
23
|
-
*/
|
|
24
|
-
export function getColumnsJson (queryParamsName, callback) {
|
|
25
|
-
indexedDB.getByWeb(queryParamsName, commonApi.getColumnsJson, { str: queryParamsName }, callback)
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* 通用表单查询
|
|
30
|
-
*/
|
|
31
|
-
export function query (parameter) {
|
|
32
|
-
return request(commonApi.query, METHOD.POST, parameter)
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* 通用表单查询
|
|
37
|
-
*/
|
|
38
|
-
export function queryWithResource (parameter) {
|
|
39
|
-
return request(commonApi.queryWithResource, METHOD.POST, parameter)
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* 通用新增/修改
|
|
44
|
-
*/
|
|
45
|
-
export function addOrModify (parameter) {
|
|
46
|
-
return request(commonApi.addOrModify, METHOD.POST, parameter)
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* 通用删除
|
|
51
|
-
*/
|
|
52
|
-
export function remove (parameter) {
|
|
53
|
-
return request(commonApi.delete, METHOD.POST, parameter)
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export { commonApi }
|
|
1
|
+
import { METHOD, request } from '@vue2-client/utils/request'
|
|
2
|
+
import { indexedDB } from '@vue2-client/utils/indexedDB'
|
|
3
|
+
|
|
4
|
+
const commonApi = {
|
|
5
|
+
// 获取表格列配置
|
|
6
|
+
getColumnsJson: '/webmeterapi/getColumns',
|
|
7
|
+
// 通用查询
|
|
8
|
+
query: '/webmeterapi/commonQuery',
|
|
9
|
+
// 表单通用查询
|
|
10
|
+
queryWithResource: '/webmeterapi/commonQueryWithResource',
|
|
11
|
+
// 通用新增/修改
|
|
12
|
+
addOrModify: '/webmeterapi/commonAddOrModify',
|
|
13
|
+
// 通用删除
|
|
14
|
+
delete: '/webmeterapi/commonDelete',
|
|
15
|
+
// 获取字典键列表
|
|
16
|
+
getDictionaryParam: '/webmeterapi/getDictionaryParam'
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* 带缓存查询的表格配置文件查询
|
|
21
|
+
* @param queryParamsName 配置名称
|
|
22
|
+
* @param callback 回调函数
|
|
23
|
+
*/
|
|
24
|
+
export function getColumnsJson (queryParamsName, callback) {
|
|
25
|
+
indexedDB.getByWeb(queryParamsName, commonApi.getColumnsJson, { str: queryParamsName }, callback)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* 通用表单查询
|
|
30
|
+
*/
|
|
31
|
+
export function query (parameter) {
|
|
32
|
+
return request(commonApi.query, METHOD.POST, parameter)
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* 通用表单查询
|
|
37
|
+
*/
|
|
38
|
+
export function queryWithResource (parameter) {
|
|
39
|
+
return request(commonApi.queryWithResource, METHOD.POST, parameter)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* 通用新增/修改
|
|
44
|
+
*/
|
|
45
|
+
export function addOrModify (parameter) {
|
|
46
|
+
return request(commonApi.addOrModify, METHOD.POST, parameter)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* 通用删除
|
|
51
|
+
*/
|
|
52
|
+
export function remove (parameter) {
|
|
53
|
+
return request(commonApi.delete, METHOD.POST, parameter)
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export { commonApi }
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { commonApi, getColumnsJson, query, addOrModify, remove } from '@vue2-client/services/api/common'
|
|
2
|
-
import { CustomerDetailsViewApi } from '@vue2-client/services/api/CustomerDetailsViewApi'
|
|
3
|
-
import { DeviceBrandDetailsViewApi } from '@vue2-client/services/api/DeviceBrandDetailsViewApi'
|
|
4
|
-
import { DeviceDetailsViewApi } from '@vue2-client/services/api/DeviceDetailsViewApi'
|
|
5
|
-
import { DeviceTypeDetailsViewApi } from '@vue2-client/services/api/DeviceTypeDetailsViewApi'
|
|
6
|
-
import { DictionaryDetailsViewApi } from '@vue2-client/services/api/DictionaryDetailsViewApi'
|
|
7
|
-
import { EmployeeDetailsViewApi } from '@vue2-client/services/api/EmployeeDetailsViewApi'
|
|
8
|
-
import { FormGroupEditApi } from '@vue2-client/services/api/FormGroupEditApi'
|
|
9
|
-
import { InstructDetailsViewApi } from '@vue2-client/services/api/InstructDetailsViewApi'
|
|
10
|
-
import { iotApi } from '@vue2-client/services/api/iot'
|
|
11
|
-
import { LogDetailsViewApi } from '@vue2-client/services/api/LogDetailsViewApi'
|
|
12
|
-
import { manageApi } from '@vue2-client/services/api/manage'
|
|
13
|
-
import { MeterDetailsViewApi } from '@vue2-client/services/api/MeterDetailsViewApi'
|
|
14
|
-
import { QueryParamsDetailsViewApi } from '@vue2-client/services/api/QueryParamsDetailsViewApi'
|
|
15
|
-
import { get, post } from '@vue2-client/services/api/restTools'
|
|
16
|
-
import { serviceApi } from '@vue2-client/services/api/service'
|
|
17
|
-
import { TicketDetailsViewApi } from '@vue2-client/services/api/TicketDetailsViewApi'
|
|
18
|
-
import { WebmeterAnalysisViewApi } from '@vue2-client/services/api/WebmeterAnalysisViewApi'
|
|
19
|
-
|
|
20
|
-
export {
|
|
21
|
-
commonApi, getColumnsJson, query, addOrModify, remove,
|
|
22
|
-
CustomerDetailsViewApi,
|
|
23
|
-
DeviceBrandDetailsViewApi,
|
|
24
|
-
DeviceDetailsViewApi,
|
|
25
|
-
DeviceTypeDetailsViewApi,
|
|
26
|
-
DictionaryDetailsViewApi,
|
|
27
|
-
EmployeeDetailsViewApi,
|
|
28
|
-
FormGroupEditApi,
|
|
29
|
-
InstructDetailsViewApi,
|
|
30
|
-
iotApi,
|
|
31
|
-
LogDetailsViewApi,
|
|
32
|
-
manageApi,
|
|
33
|
-
MeterDetailsViewApi,
|
|
34
|
-
QueryParamsDetailsViewApi,
|
|
35
|
-
get, post,
|
|
36
|
-
serviceApi,
|
|
37
|
-
TicketDetailsViewApi,
|
|
38
|
-
WebmeterAnalysisViewApi
|
|
39
|
-
}
|
|
1
|
+
import { commonApi, getColumnsJson, query, addOrModify, remove } from '@vue2-client/services/api/common'
|
|
2
|
+
import { CustomerDetailsViewApi } from '@vue2-client/services/api/CustomerDetailsViewApi'
|
|
3
|
+
import { DeviceBrandDetailsViewApi } from '@vue2-client/services/api/DeviceBrandDetailsViewApi'
|
|
4
|
+
import { DeviceDetailsViewApi } from '@vue2-client/services/api/DeviceDetailsViewApi'
|
|
5
|
+
import { DeviceTypeDetailsViewApi } from '@vue2-client/services/api/DeviceTypeDetailsViewApi'
|
|
6
|
+
import { DictionaryDetailsViewApi } from '@vue2-client/services/api/DictionaryDetailsViewApi'
|
|
7
|
+
import { EmployeeDetailsViewApi } from '@vue2-client/services/api/EmployeeDetailsViewApi'
|
|
8
|
+
import { FormGroupEditApi } from '@vue2-client/services/api/FormGroupEditApi'
|
|
9
|
+
import { InstructDetailsViewApi } from '@vue2-client/services/api/InstructDetailsViewApi'
|
|
10
|
+
import { iotApi } from '@vue2-client/services/api/iot'
|
|
11
|
+
import { LogDetailsViewApi } from '@vue2-client/services/api/LogDetailsViewApi'
|
|
12
|
+
import { manageApi } from '@vue2-client/services/api/manage'
|
|
13
|
+
import { MeterDetailsViewApi } from '@vue2-client/services/api/MeterDetailsViewApi'
|
|
14
|
+
import { QueryParamsDetailsViewApi } from '@vue2-client/services/api/QueryParamsDetailsViewApi'
|
|
15
|
+
import { get, post } from '@vue2-client/services/api/restTools'
|
|
16
|
+
import { serviceApi } from '@vue2-client/services/api/service'
|
|
17
|
+
import { TicketDetailsViewApi } from '@vue2-client/services/api/TicketDetailsViewApi'
|
|
18
|
+
import { WebmeterAnalysisViewApi } from '@vue2-client/services/api/WebmeterAnalysisViewApi'
|
|
19
|
+
|
|
20
|
+
export {
|
|
21
|
+
commonApi, getColumnsJson, query, addOrModify, remove,
|
|
22
|
+
CustomerDetailsViewApi,
|
|
23
|
+
DeviceBrandDetailsViewApi,
|
|
24
|
+
DeviceDetailsViewApi,
|
|
25
|
+
DeviceTypeDetailsViewApi,
|
|
26
|
+
DictionaryDetailsViewApi,
|
|
27
|
+
EmployeeDetailsViewApi,
|
|
28
|
+
FormGroupEditApi,
|
|
29
|
+
InstructDetailsViewApi,
|
|
30
|
+
iotApi,
|
|
31
|
+
LogDetailsViewApi,
|
|
32
|
+
manageApi,
|
|
33
|
+
MeterDetailsViewApi,
|
|
34
|
+
QueryParamsDetailsViewApi,
|
|
35
|
+
get, post,
|
|
36
|
+
serviceApi,
|
|
37
|
+
TicketDetailsViewApi,
|
|
38
|
+
WebmeterAnalysisViewApi
|
|
39
|
+
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
const DeviceDetailsCountApi = {
|
|
2
|
-
// 获取设备使用天数
|
|
3
|
-
getDeviceUsedDaySum: '/webmeterapi/getDeviceUsedDaySum',
|
|
4
|
-
// 获取设备累计上报次数和近七天上报情况
|
|
5
|
-
getDeviceUploadTimesCount: '/webmeterapi/getDeviceUploadTimesCount',
|
|
6
|
-
// 获取设备累计失联次数和近三个月失联情况
|
|
7
|
-
getDeviceLostContactCount: '/webmeterapi/getDeviceLostContactCount',
|
|
8
|
-
// 获取设备指令下发成功率
|
|
9
|
-
getInstructRateOfSuccess: '/webmeterapi/getInstructRateOfSuccess',
|
|
10
|
-
// 获取设备上报情况
|
|
11
|
-
getDeviceUploadCountData: '/webmeterapi/getDeviceUploadCountData',
|
|
12
|
-
// 获取设备失联情况
|
|
13
|
-
getDeviceLostContactCountData: '/webmeterapi/getDeviceLostContactCountData',
|
|
14
|
-
// 获取设备失联排行榜
|
|
15
|
-
getDeviceLostContactRankData: '/webmeterapi/getDeviceLostContactRankData'
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export { DeviceDetailsCountApi }
|
|
1
|
+
const DeviceDetailsCountApi = {
|
|
2
|
+
// 获取设备使用天数
|
|
3
|
+
getDeviceUsedDaySum: '/webmeterapi/getDeviceUsedDaySum',
|
|
4
|
+
// 获取设备累计上报次数和近七天上报情况
|
|
5
|
+
getDeviceUploadTimesCount: '/webmeterapi/getDeviceUploadTimesCount',
|
|
6
|
+
// 获取设备累计失联次数和近三个月失联情况
|
|
7
|
+
getDeviceLostContactCount: '/webmeterapi/getDeviceLostContactCount',
|
|
8
|
+
// 获取设备指令下发成功率
|
|
9
|
+
getInstructRateOfSuccess: '/webmeterapi/getInstructRateOfSuccess',
|
|
10
|
+
// 获取设备上报情况
|
|
11
|
+
getDeviceUploadCountData: '/webmeterapi/getDeviceUploadCountData',
|
|
12
|
+
// 获取设备失联情况
|
|
13
|
+
getDeviceLostContactCountData: '/webmeterapi/getDeviceLostContactCountData',
|
|
14
|
+
// 获取设备失联排行榜
|
|
15
|
+
getDeviceLostContactRankData: '/webmeterapi/getDeviceLostContactRankData'
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export { DeviceDetailsCountApi }
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
const manageApi = {
|
|
2
|
-
// 查询:获取燃气公司列表
|
|
3
|
-
orgList: '/webmeterapi/foreignaidGetOrgList',
|
|
4
|
-
// 查询:获取客户列表
|
|
5
|
-
customerList: '/webmeterapi/foreignaidGetCustomerList',
|
|
6
|
-
// 查询:检查链接有效性
|
|
7
|
-
checkUrlWork: '/webmeterapi/foreignaidCheckUrl',
|
|
8
|
-
// 操作:客户数据
|
|
9
|
-
doCustomerInfo: '/webmeterapi/foreignaidDoCustomerInfo',
|
|
10
|
-
// 查询:获取字典键列表
|
|
11
|
-
getDictionaryValue: '/webmeterapi/getDictionaryValue',
|
|
12
|
-
// 查询:获取省市区街道三级分类
|
|
13
|
-
getDivisionsOhChina: '/webmeterapi/getDivisionsOhChina'
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export { manageApi }
|
|
1
|
+
const manageApi = {
|
|
2
|
+
// 查询:获取燃气公司列表
|
|
3
|
+
orgList: '/webmeterapi/foreignaidGetOrgList',
|
|
4
|
+
// 查询:获取客户列表
|
|
5
|
+
customerList: '/webmeterapi/foreignaidGetCustomerList',
|
|
6
|
+
// 查询:检查链接有效性
|
|
7
|
+
checkUrlWork: '/webmeterapi/foreignaidCheckUrl',
|
|
8
|
+
// 操作:客户数据
|
|
9
|
+
doCustomerInfo: '/webmeterapi/foreignaidDoCustomerInfo',
|
|
10
|
+
// 查询:获取字典键列表
|
|
11
|
+
getDictionaryValue: '/webmeterapi/getDictionaryValue',
|
|
12
|
+
// 查询:获取省市区街道三级分类
|
|
13
|
+
getDivisionsOhChina: '/webmeterapi/getDivisionsOhChina'
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { manageApi }
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { METHOD, request } from '@vue2-client/utils/request'
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* GET请求
|
|
5
|
-
* @param url 请求地址
|
|
6
|
-
* @param parameter 路径参数
|
|
7
|
-
* @returns {Promise<AxiosResponse<T>>}
|
|
8
|
-
*/
|
|
9
|
-
function get (url, parameter) {
|
|
10
|
-
return request(url, METHOD.GET, parameter)
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* POST请求
|
|
15
|
-
* @param url 请求地址
|
|
16
|
-
* @param parameter 请求参数
|
|
17
|
-
* @param config
|
|
18
|
-
* @returns {Promise<AxiosResponse<T>>}
|
|
19
|
-
*/
|
|
20
|
-
function post (url, parameter, config = {}) {
|
|
21
|
-
return request(url, METHOD.POST, parameter, config)
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export { get, post }
|
|
1
|
+
import { METHOD, request } from '@vue2-client/utils/request'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* GET请求
|
|
5
|
+
* @param url 请求地址
|
|
6
|
+
* @param parameter 路径参数
|
|
7
|
+
* @returns {Promise<AxiosResponse<T>>}
|
|
8
|
+
*/
|
|
9
|
+
function get (url, parameter) {
|
|
10
|
+
return request(url, METHOD.GET, parameter)
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* POST请求
|
|
15
|
+
* @param url 请求地址
|
|
16
|
+
* @param parameter 请求参数
|
|
17
|
+
* @param config
|
|
18
|
+
* @returns {Promise<AxiosResponse<T>>}
|
|
19
|
+
*/
|
|
20
|
+
function post (url, parameter, config = {}) {
|
|
21
|
+
return request(url, METHOD.POST, parameter, config)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { get, post }
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
.week-mode{
|
|
2
|
-
overflow: hidden;
|
|
3
|
-
filter: invert(80%);
|
|
4
|
-
}
|
|
5
|
-
.beauty-scroll{
|
|
6
|
-
scrollbar-color: @primary-color @primary-2;
|
|
7
|
-
scrollbar-width: thin;
|
|
8
|
-
-ms-overflow-style:none;
|
|
9
|
-
position: relative;
|
|
10
|
-
&::-webkit-scrollbar{
|
|
11
|
-
width: 3px;
|
|
12
|
-
height: 1px;
|
|
13
|
-
}
|
|
14
|
-
&::-webkit-scrollbar-thumb {
|
|
15
|
-
border-radius: 3px;
|
|
16
|
-
background: @primary-color;
|
|
17
|
-
}
|
|
18
|
-
&::-webkit-scrollbar-track {
|
|
19
|
-
-webkit-box-shadow: inset 0 0 1px rgba(0,0,0,0);
|
|
20
|
-
border-radius: 3px;
|
|
21
|
-
background: @primary-3;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
.split-right{
|
|
25
|
-
&:not(:last-child) {
|
|
26
|
-
border-right: 1px solid rgba(98, 98, 98, 0.2);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
.disabled{
|
|
30
|
-
cursor: not-allowed;
|
|
31
|
-
color: @disabled-color;
|
|
32
|
-
pointer-events: none;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
::-webkit-scrollbar{
|
|
36
|
-
width: 5px;
|
|
37
|
-
height: 5px;
|
|
38
|
-
}
|
|
39
|
-
::-webkit-scrollbar-thumb {
|
|
40
|
-
border-radius: 3px;
|
|
41
|
-
background: @primary-3;
|
|
42
|
-
}
|
|
43
|
-
::-webkit-scrollbar-track {
|
|
44
|
-
-webkit-box-shadow: inset 0 0 1px rgba(0,0,0,0);
|
|
45
|
-
border-radius: 3px;
|
|
46
|
-
background: @primary-1;
|
|
47
|
-
}
|
|
1
|
+
.week-mode{
|
|
2
|
+
overflow: hidden;
|
|
3
|
+
filter: invert(80%);
|
|
4
|
+
}
|
|
5
|
+
.beauty-scroll{
|
|
6
|
+
scrollbar-color: @primary-color @primary-2;
|
|
7
|
+
scrollbar-width: thin;
|
|
8
|
+
-ms-overflow-style:none;
|
|
9
|
+
position: relative;
|
|
10
|
+
&::-webkit-scrollbar{
|
|
11
|
+
width: 3px;
|
|
12
|
+
height: 1px;
|
|
13
|
+
}
|
|
14
|
+
&::-webkit-scrollbar-thumb {
|
|
15
|
+
border-radius: 3px;
|
|
16
|
+
background: @primary-color;
|
|
17
|
+
}
|
|
18
|
+
&::-webkit-scrollbar-track {
|
|
19
|
+
-webkit-box-shadow: inset 0 0 1px rgba(0,0,0,0);
|
|
20
|
+
border-radius: 3px;
|
|
21
|
+
background: @primary-3;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
.split-right{
|
|
25
|
+
&:not(:last-child) {
|
|
26
|
+
border-right: 1px solid rgba(98, 98, 98, 0.2);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
.disabled{
|
|
30
|
+
cursor: not-allowed;
|
|
31
|
+
color: @disabled-color;
|
|
32
|
+
pointer-events: none;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
::-webkit-scrollbar{
|
|
36
|
+
width: 5px;
|
|
37
|
+
height: 5px;
|
|
38
|
+
}
|
|
39
|
+
::-webkit-scrollbar-thumb {
|
|
40
|
+
border-radius: 3px;
|
|
41
|
+
background: @primary-3;
|
|
42
|
+
}
|
|
43
|
+
::-webkit-scrollbar-track {
|
|
44
|
+
-webkit-box-shadow: inset 0 0 1px rgba(0,0,0,0);
|
|
45
|
+
border-radius: 3px;
|
|
46
|
+
background: @primary-1;
|
|
47
|
+
}
|
package/src/utils/request.js
CHANGED
|
@@ -4,7 +4,7 @@ import Vue from 'vue'
|
|
|
4
4
|
import { ACCESS_TOKEN } from '@vue2-client/store/mutation-types'
|
|
5
5
|
import notification from 'ant-design-vue/es/notification'
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
let compatible
|
|
8
8
|
|
|
9
9
|
// 跨域认证信息 header 名
|
|
10
10
|
const xsrfHeaderName = 'Authorization'
|
|
@@ -151,10 +151,14 @@ function checkAuthorization (authType = AUTH_TYPE.BEARER) {
|
|
|
151
151
|
function loadInterceptors () {
|
|
152
152
|
// 加载请求拦截器
|
|
153
153
|
axios.interceptors.request.use(config => {
|
|
154
|
-
const token = localStorage.getItem(ACCESS_TOKEN)
|
|
154
|
+
const token = localStorage.getItem('ACCESS_TOKEN')
|
|
155
155
|
// 如果 token 存在
|
|
156
156
|
// 让每个请求携带自定义 token 请根据实际情况自行修改
|
|
157
157
|
if (token) {
|
|
158
|
+
// 如果是首次使用系统LocalStorage需要初始化,在登陆之后重新获取一次compatible
|
|
159
|
+
if (compatible === null) {
|
|
160
|
+
compatible = localStorage.getItem('compatible')
|
|
161
|
+
}
|
|
158
162
|
// 判断是否为V4环境
|
|
159
163
|
if (compatible === 'V4') {
|
|
160
164
|
// V4 环境则添加 V4请求头
|
|
@@ -171,7 +175,11 @@ function loadInterceptors () {
|
|
|
171
175
|
}, errorHandler)
|
|
172
176
|
// 加载响应拦截器
|
|
173
177
|
axios.interceptors.response.use((response) => {
|
|
174
|
-
// 判断是否为V4
|
|
178
|
+
// 判断是否为V4环境,不为compatible赋初始值
|
|
179
|
+
// 其有可能是undefined未定义,或第一次使用本系统LocalStorage在初始化,获得的值为null
|
|
180
|
+
if (compatible === null || compatible === undefined) {
|
|
181
|
+
compatible = localStorage.getItem('compatible')
|
|
182
|
+
}
|
|
175
183
|
if (compatible === 'V4') {
|
|
176
184
|
if (response.data.data) {
|
|
177
185
|
return response.data.data
|