vue2-client 1.2.65 → 1.2.68
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 +4 -0
- package/package.json +1 -1
- package/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox.vue +225 -225
- package/src/base-client/components/common/AmapMarker/AmapPointRendering.vue +113 -111
- 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/CreateQueryItem.vue +770 -770
- package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQuery.vue +310 -310
- package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQueryItem.vue +550 -550
- package/src/base-client/components/common/Upload/Upload.vue +151 -151
- 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/XForm/XFormItem.vue +358 -358
- package/src/base-client/components/common/XFormTable/XFormTable.vue +17 -16
- package/src/base-client/components/common/XTable/XTable.vue +14 -12
- package/src/base-client/components/iot/DeviceBrandDetailsView/DeviceBrandDetailsView.vue +1 -1
- package/src/base-client/components/iot/DeviceDetailsView/DeviceDetailsView.vue +1 -2
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsException.vue +57 -57
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsMain.vue +1 -1
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsRead.vue +131 -131
- package/src/base-client/components/iot/DeviceTypeDetailsView/DeviceTypeDetailsView.vue +300 -272
- package/src/base-client/components/iot/WebmeterAnalysisView/WebmeterAnalysisView.vue +647 -647
- package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +532 -532
- package/src/base-client/plugins/AppData.js +70 -70
- package/src/base-client/plugins/compatible/LoginServiceOA.js +20 -20
- package/src/config/CreateQueryConfig.js +301 -301
- 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/common.js +56 -56
- 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/map-utils.js +28 -28
- package/src/utils/request.js +198 -198
- package/src/utils/util.js +222 -222
|
@@ -1,98 +1,98 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div id="orgListManage">
|
|
3
|
-
<a-card :bordered="false">
|
|
4
|
-
<!--<a-row :gutter="48">-->
|
|
5
|
-
<!--<a-col>-->
|
|
6
|
-
<!--<a-space>-->
|
|
7
|
-
<!--<a-button type="primary" @click="addItem" v-if="!buttonState || buttonState.add">-->
|
|
8
|
-
<!--<a-icon :style="iconStyle" type="plus"/>新增-->
|
|
9
|
-
<!--</a-button>-->
|
|
10
|
-
<!--<a-button-->
|
|
11
|
-
<!--v-if="!buttonState || buttonState.edit"-->
|
|
12
|
-
<!--:loading="editDataLoading"-->
|
|
13
|
-
<!--:disabled="!isModify"-->
|
|
14
|
-
<!--class="btn-success"-->
|
|
15
|
-
<!--type="dashed"-->
|
|
16
|
-
<!--@click="editItem">-->
|
|
17
|
-
<!--<a-icon :style="iconStyle" type="edit"/>修改-->
|
|
18
|
-
<!--</a-button>-->
|
|
19
|
-
<!--<a-button :disabled="!isDelete" type="danger" @click="deleteItem" v-if="!buttonState || buttonState.delete">-->
|
|
20
|
-
<!--<a-icon :style="iconStyle" type="delete"/>删除-->
|
|
21
|
-
<!--</a-button>-->
|
|
22
|
-
<!--</a-space>-->
|
|
23
|
-
<!--<span :style="{ float: 'right', overflow: 'hidden', marginBottom: '8px' }">-->
|
|
24
|
-
<!--<a-button-group>-->
|
|
25
|
-
<!--<a-button @click="toggleIsFormShow">-->
|
|
26
|
-
<!--<a-icon :style="iconStyle" type="vertical-align-top"/>-->
|
|
27
|
-
<!--</a-button>-->
|
|
28
|
-
<!--<a-button @click="refresh(true)">-->
|
|
29
|
-
<!--<a-icon :style="iconStyle" type="reload" />-->
|
|
30
|
-
<!--</a-button>-->
|
|
31
|
-
<!--<a-button @click="showDrawer">-->
|
|
32
|
-
<!--<a-icon :style="iconStyle" type="table" />-->
|
|
33
|
-
<!--</a-button>-->
|
|
34
|
-
<!--<a-button @click="exports">-->
|
|
35
|
-
<!--<a-icon :style="iconStyle" type="cloud-download"/>-->
|
|
36
|
-
<!--</a-button>-->
|
|
37
|
-
<!--</a-button-group>-->
|
|
38
|
-
<!--</span>-->
|
|
39
|
-
<!--</a-col>-->
|
|
40
|
-
<!--</a-row>-->
|
|
41
|
-
<a-table
|
|
42
|
-
:columns="columns"
|
|
43
|
-
:data-source="funTree"
|
|
44
|
-
:pagination="false"
|
|
45
|
-
bordered
|
|
46
|
-
rowKey="id"
|
|
47
|
-
size="middle">
|
|
48
|
-
</a-table>
|
|
49
|
-
</a-card>
|
|
50
|
-
</div>
|
|
51
|
-
</template>
|
|
52
|
-
|
|
53
|
-
<script>
|
|
54
|
-
import { getOrganization, searchFun } from '@vue2-client/base-client/plugins/GetLoginInfoService'
|
|
55
|
-
import { getColumnsJson } from '@vue2-client/services/api'
|
|
56
|
-
export default {
|
|
57
|
-
// 组织管理
|
|
58
|
-
name: 'orgListManage',
|
|
59
|
-
data () {
|
|
60
|
-
return {
|
|
61
|
-
columnsJson: [],
|
|
62
|
-
funTree: [],
|
|
63
|
-
columns: [
|
|
64
|
-
{
|
|
65
|
-
title: '组织名称',
|
|
66
|
-
dataIndex: 'name'
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
title: '排序',
|
|
70
|
-
dataIndex: 'position'
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
title: '组件目录',
|
|
74
|
-
dataIndex: 'f_dir'
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
title: '描述',
|
|
78
|
-
dataIndex: 'f_description'
|
|
79
|
-
}
|
|
80
|
-
]
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
created () {
|
|
84
|
-
},
|
|
85
|
-
async mounted () {
|
|
86
|
-
getColumnsJson('orgListManage', (res) => {
|
|
87
|
-
this.columnsJson = res
|
|
88
|
-
})
|
|
89
|
-
const fun = await getOrganization()
|
|
90
|
-
this.funTree = searchFun(fun, '组织机构')
|
|
91
|
-
},
|
|
92
|
-
methods: {
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
</script>
|
|
96
|
-
|
|
97
|
-
<style lang="less">
|
|
98
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div id="orgListManage">
|
|
3
|
+
<a-card :bordered="false">
|
|
4
|
+
<!--<a-row :gutter="48">-->
|
|
5
|
+
<!--<a-col>-->
|
|
6
|
+
<!--<a-space>-->
|
|
7
|
+
<!--<a-button type="primary" @click="addItem" v-if="!buttonState || buttonState.add">-->
|
|
8
|
+
<!--<a-icon :style="iconStyle" type="plus"/>新增-->
|
|
9
|
+
<!--</a-button>-->
|
|
10
|
+
<!--<a-button-->
|
|
11
|
+
<!--v-if="!buttonState || buttonState.edit"-->
|
|
12
|
+
<!--:loading="editDataLoading"-->
|
|
13
|
+
<!--:disabled="!isModify"-->
|
|
14
|
+
<!--class="btn-success"-->
|
|
15
|
+
<!--type="dashed"-->
|
|
16
|
+
<!--@click="editItem">-->
|
|
17
|
+
<!--<a-icon :style="iconStyle" type="edit"/>修改-->
|
|
18
|
+
<!--</a-button>-->
|
|
19
|
+
<!--<a-button :disabled="!isDelete" type="danger" @click="deleteItem" v-if="!buttonState || buttonState.delete">-->
|
|
20
|
+
<!--<a-icon :style="iconStyle" type="delete"/>删除-->
|
|
21
|
+
<!--</a-button>-->
|
|
22
|
+
<!--</a-space>-->
|
|
23
|
+
<!--<span :style="{ float: 'right', overflow: 'hidden', marginBottom: '8px' }">-->
|
|
24
|
+
<!--<a-button-group>-->
|
|
25
|
+
<!--<a-button @click="toggleIsFormShow">-->
|
|
26
|
+
<!--<a-icon :style="iconStyle" type="vertical-align-top"/>-->
|
|
27
|
+
<!--</a-button>-->
|
|
28
|
+
<!--<a-button @click="refresh(true)">-->
|
|
29
|
+
<!--<a-icon :style="iconStyle" type="reload" />-->
|
|
30
|
+
<!--</a-button>-->
|
|
31
|
+
<!--<a-button @click="showDrawer">-->
|
|
32
|
+
<!--<a-icon :style="iconStyle" type="table" />-->
|
|
33
|
+
<!--</a-button>-->
|
|
34
|
+
<!--<a-button @click="exports">-->
|
|
35
|
+
<!--<a-icon :style="iconStyle" type="cloud-download"/>-->
|
|
36
|
+
<!--</a-button>-->
|
|
37
|
+
<!--</a-button-group>-->
|
|
38
|
+
<!--</span>-->
|
|
39
|
+
<!--</a-col>-->
|
|
40
|
+
<!--</a-row>-->
|
|
41
|
+
<a-table
|
|
42
|
+
:columns="columns"
|
|
43
|
+
:data-source="funTree"
|
|
44
|
+
:pagination="false"
|
|
45
|
+
bordered
|
|
46
|
+
rowKey="id"
|
|
47
|
+
size="middle">
|
|
48
|
+
</a-table>
|
|
49
|
+
</a-card>
|
|
50
|
+
</div>
|
|
51
|
+
</template>
|
|
52
|
+
|
|
53
|
+
<script>
|
|
54
|
+
import { getOrganization, searchFun } from '@vue2-client/base-client/plugins/GetLoginInfoService'
|
|
55
|
+
import { getColumnsJson } from '@vue2-client/services/api'
|
|
56
|
+
export default {
|
|
57
|
+
// 组织管理
|
|
58
|
+
name: 'orgListManage',
|
|
59
|
+
data () {
|
|
60
|
+
return {
|
|
61
|
+
columnsJson: [],
|
|
62
|
+
funTree: [],
|
|
63
|
+
columns: [
|
|
64
|
+
{
|
|
65
|
+
title: '组织名称',
|
|
66
|
+
dataIndex: 'name'
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
title: '排序',
|
|
70
|
+
dataIndex: 'position'
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
title: '组件目录',
|
|
74
|
+
dataIndex: 'f_dir'
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
title: '描述',
|
|
78
|
+
dataIndex: 'f_description'
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
created () {
|
|
84
|
+
},
|
|
85
|
+
async mounted () {
|
|
86
|
+
getColumnsJson('orgListManage', (res) => {
|
|
87
|
+
this.columnsJson = res
|
|
88
|
+
})
|
|
89
|
+
const fun = await getOrganization()
|
|
90
|
+
this.funTree = searchFun(fun, '组织机构')
|
|
91
|
+
},
|
|
92
|
+
methods: {
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
</script>
|
|
96
|
+
|
|
97
|
+
<style lang="less">
|
|
98
|
+
</style>
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import routerMap from './router.map'
|
|
2
|
-
import { parseRoutes } from '@vue2-client/utils/routerUtil'
|
|
3
|
-
|
|
4
|
-
// 异步路由配置
|
|
5
|
-
const routesConfig = [
|
|
6
|
-
'login',
|
|
7
|
-
'submitTicket',
|
|
8
|
-
'root',
|
|
9
|
-
{
|
|
10
|
-
router: 'exp404',
|
|
11
|
-
path: '*',
|
|
12
|
-
name: '404'
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
router: 'exp403',
|
|
16
|
-
path: '/403',
|
|
17
|
-
name: '403'
|
|
18
|
-
}
|
|
19
|
-
]
|
|
20
|
-
|
|
21
|
-
const options = {
|
|
22
|
-
mode: 'history',
|
|
23
|
-
routes: parseRoutes(routesConfig, routerMap)
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export default options
|
|
1
|
+
import routerMap from './router.map'
|
|
2
|
+
import { parseRoutes } from '@vue2-client/utils/routerUtil'
|
|
3
|
+
|
|
4
|
+
// 异步路由配置
|
|
5
|
+
const routesConfig = [
|
|
6
|
+
'login',
|
|
7
|
+
'submitTicket',
|
|
8
|
+
'root',
|
|
9
|
+
{
|
|
10
|
+
router: 'exp404',
|
|
11
|
+
path: '*',
|
|
12
|
+
name: '404'
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
router: 'exp403',
|
|
16
|
+
path: '/403',
|
|
17
|
+
name: '403'
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
const options = {
|
|
22
|
+
mode: 'history',
|
|
23
|
+
routes: parseRoutes(routesConfig, routerMap)
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export default options
|
|
@@ -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 }
|
|
@@ -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,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 }
|