vue2-client 1.2.84 → 1.2.88
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/App.vue +2 -1
- 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 +2 -2
- 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 +62 -51
- 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 +24 -7
|
@@ -33,8 +33,6 @@ const GetAppDataService = {
|
|
|
33
33
|
// 追加参数
|
|
34
34
|
localStorage.setItem(process.env.VUE_APP_DICTIONARY_KEY, JSON.stringify(params))
|
|
35
35
|
localStorage.setItem(process.env.VUE_APP_BADGE_KEY, JSON.stringify(badgeItemArray))
|
|
36
|
-
// 清除compatible
|
|
37
|
-
localStorage.removeItem('compatible')
|
|
38
36
|
})
|
|
39
37
|
// 获取省市区数据
|
|
40
38
|
await post(manageApi.getDivisionsOhChina, {}).then((res) => {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { get } from '@vue2-client/services/api'
|
|
2
|
-
import Vue from 'vue'
|
|
3
|
-
|
|
4
|
-
async function loginStart (name, password) {
|
|
5
|
-
const resource = await get(`/rs/user/${name}/${password}/智慧OA`, {})
|
|
6
|
-
console.log('登陆获取', resource)
|
|
7
|
-
Vue.$login.f = resource
|
|
8
|
-
await Promise.all([Vue.$appdata.load()])
|
|
9
|
-
const login = {
|
|
10
|
-
f: Vue.$login.f,
|
|
11
|
-
jwt: Vue.$login.f.id,
|
|
12
|
-
r: Vue.$login.r
|
|
13
|
-
}
|
|
14
|
-
Vue.$store.commit('account/setLogin', login)
|
|
15
|
-
return resource
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export {
|
|
19
|
-
loginStart
|
|
20
|
-
}
|
|
1
|
+
import { get } from '@vue2-client/services/api'
|
|
2
|
+
import Vue from 'vue'
|
|
3
|
+
|
|
4
|
+
async function loginStart (name, password) {
|
|
5
|
+
const resource = await get(`/rs/user/${name}/${password}/智慧OA`, {})
|
|
6
|
+
console.log('登陆获取', resource)
|
|
7
|
+
Vue.$login.f = resource
|
|
8
|
+
await Promise.all([Vue.$appdata.load()])
|
|
9
|
+
const login = {
|
|
10
|
+
f: Vue.$login.f,
|
|
11
|
+
jwt: Vue.$login.f.id,
|
|
12
|
+
r: Vue.$login.r
|
|
13
|
+
}
|
|
14
|
+
Vue.$store.commit('account/setLogin', login)
|
|
15
|
+
return resource
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export {
|
|
19
|
+
loginStart
|
|
20
|
+
}
|
|
@@ -93,7 +93,7 @@ export default {
|
|
|
93
93
|
}
|
|
94
94
|
case 'OA' : {
|
|
95
95
|
loginStart(name, password).then(this.afterLoginOA).finally(() => { this.logging = false })
|
|
96
|
-
|
|
96
|
+
break
|
|
97
97
|
}
|
|
98
98
|
case 'V4' : {
|
|
99
99
|
V4Login(name, password).then(this.afterLoginV4)
|
|
@@ -116,16 +116,27 @@ export default {
|
|
|
116
116
|
const password = this.form.getFieldValue('password')
|
|
117
117
|
this.logging = false
|
|
118
118
|
const loginRes = res
|
|
119
|
-
|
|
119
|
+
// 如果这是用户首次打开本系统,localStorage无法初始化,改用code判断
|
|
120
|
+
let pass = false
|
|
121
|
+
let V4Token = {}
|
|
122
|
+
// 判断是否是第一次使用本系统
|
|
123
|
+
if (res.code) {
|
|
124
|
+
if (res.code === 200) {
|
|
125
|
+
pass = true
|
|
126
|
+
// 如果返回值有code,证明是第一次使用系统,localStorage判断compatible失效
|
|
127
|
+
// token需要从.data中获取
|
|
128
|
+
V4Token = { token: res.data.access_token, expire: res.data.expires_in }
|
|
129
|
+
}
|
|
130
|
+
} else {
|
|
131
|
+
V4Token = { token: res.access_token, expire: res.expires_in }
|
|
132
|
+
}
|
|
120
133
|
this.setV4AccessToken(V4Token)
|
|
121
134
|
// 向本地缓存中临时存储compatible
|
|
122
|
-
|
|
123
|
-
if (loginRes.code === 200) {
|
|
135
|
+
if (loginRes.access_token || pass) {
|
|
124
136
|
const encrypt = new JSEncrypt()
|
|
125
137
|
encrypt.setPublicKey('MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqPvovSfXcwBbW8cKMCgwqNpsYuzF8RPAPFb7LGsnVo44JhM/xxzDyzoYtdfNmtbIuKVi9PzIsyp6rg+09gbuI6UGwBZ5DWBDBMqv5MPdOF5dCQkB2Bbr5yPfURPENypUz+pBFBg41d+BC+rwRiXELwKy7Y9caD/MtJyHydj8OUwIDAQAB')
|
|
126
138
|
const data = encrypt.encrypt(JSON.stringify({ username: name, password: password }))
|
|
127
139
|
// 获取路由配置
|
|
128
|
-
console.log('开始请求智慧燃气')
|
|
129
140
|
getRoutesConfig(data).then(result => {
|
|
130
141
|
this.$login.login(result).then(() => {
|
|
131
142
|
this.afterGeneral(result)
|
|
@@ -205,59 +216,59 @@ export default {
|
|
|
205
216
|
</script>
|
|
206
217
|
|
|
207
218
|
<style lang="less" scoped>
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
219
|
+
.common-layout{
|
|
220
|
+
.top {
|
|
221
|
+
text-align: center;
|
|
222
|
+
.header {
|
|
223
|
+
height: 44px;
|
|
224
|
+
line-height: 44px;
|
|
225
|
+
a {
|
|
226
|
+
text-decoration: none;
|
|
227
|
+
}
|
|
228
|
+
.logo {
|
|
212
229
|
height: 44px;
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
text-decoration: none;
|
|
216
|
-
}
|
|
217
|
-
.logo {
|
|
218
|
-
height: 44px;
|
|
219
|
-
vertical-align: top;
|
|
220
|
-
margin-right: 16px;
|
|
221
|
-
}
|
|
222
|
-
.title {
|
|
223
|
-
font-size: 33px;
|
|
224
|
-
color: @title-color;
|
|
225
|
-
font-family: 'Myriad Pro', 'Helvetica Neue', Arial, Helvetica, sans-serif;
|
|
226
|
-
font-weight: 600;
|
|
227
|
-
position: relative;
|
|
228
|
-
top: 2px;
|
|
229
|
-
}
|
|
230
|
+
vertical-align: top;
|
|
231
|
+
margin-right: 16px;
|
|
230
232
|
}
|
|
231
|
-
.
|
|
232
|
-
font-size:
|
|
233
|
-
color: @
|
|
234
|
-
|
|
235
|
-
|
|
233
|
+
.title {
|
|
234
|
+
font-size: 33px;
|
|
235
|
+
color: @title-color;
|
|
236
|
+
font-family: 'Myriad Pro', 'Helvetica Neue', Arial, Helvetica, sans-serif;
|
|
237
|
+
font-weight: 600;
|
|
238
|
+
position: relative;
|
|
239
|
+
top: 2px;
|
|
236
240
|
}
|
|
237
241
|
}
|
|
238
|
-
.
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
242
|
+
.desc {
|
|
243
|
+
font-size: 14px;
|
|
244
|
+
color: @text-color-second;
|
|
245
|
+
margin-top: 12px;
|
|
246
|
+
margin-bottom: 40px;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
.login{
|
|
250
|
+
width: 368px;
|
|
251
|
+
margin: 0 auto;
|
|
252
|
+
@media screen and (max-width: 576px) {
|
|
253
|
+
width: 95%;
|
|
254
|
+
}
|
|
255
|
+
@media screen and (max-width: 320px) {
|
|
256
|
+
.captcha-button{
|
|
257
|
+
font-size: 14px;
|
|
248
258
|
}
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
259
|
+
}
|
|
260
|
+
.icon {
|
|
261
|
+
font-size: 24px;
|
|
262
|
+
color: @text-color-second;
|
|
263
|
+
margin-left: 16px;
|
|
264
|
+
vertical-align: middle;
|
|
265
|
+
cursor: pointer;
|
|
266
|
+
transition: color 0.3s;
|
|
256
267
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
}
|
|
268
|
+
&:hover {
|
|
269
|
+
color: @primary-color;
|
|
260
270
|
}
|
|
261
271
|
}
|
|
262
272
|
}
|
|
273
|
+
}
|
|
263
274
|
</style>
|
|
@@ -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
|
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,20 +1,20 @@
|
|
|
1
|
-
const WebmeterAnalysisViewApi = {
|
|
2
|
-
// 查询:指令数统计
|
|
3
|
-
instructSumCount: '/webmeterapi/foreignaidInstructSumCountData',
|
|
4
|
-
// 查询:抄表数统计
|
|
5
|
-
meteReadSumCount: '/webmeterapi/foreignaidMetereadSumCountData',
|
|
6
|
-
// 查询:近一周抄表量数据
|
|
7
|
-
meteReadDataByWeek: '/webmeterapi/foreignaidMetereadDataByWeekData',
|
|
8
|
-
// 查询:在用表具数
|
|
9
|
-
usingMeterSumCount: '/webmeterapi/foreignaidUsingMeterSumCountData',
|
|
10
|
-
// 查询:近一周在用表具数数据
|
|
11
|
-
usingMeterDataByWeek: '/webmeterapi/foreignaidUsingMeterDataByWeekData',
|
|
12
|
-
// 查询:指令成功率统计
|
|
13
|
-
instructRateOfSuccess: '/webmeterapi/foreignaidInstructRateOfSuccessData',
|
|
14
|
-
// 查询:按表厂抄表量统计
|
|
15
|
-
handMeterSumCountData: '/webmeterapi/foreignaidHandMeterSumCountData',
|
|
16
|
-
// 查询:统计用气量数据
|
|
17
|
-
useGasSumCount: '/webmeterapi/foreignaidUseGasSumCountData'
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export { WebmeterAnalysisViewApi }
|
|
1
|
+
const WebmeterAnalysisViewApi = {
|
|
2
|
+
// 查询:指令数统计
|
|
3
|
+
instructSumCount: '/webmeterapi/foreignaidInstructSumCountData',
|
|
4
|
+
// 查询:抄表数统计
|
|
5
|
+
meteReadSumCount: '/webmeterapi/foreignaidMetereadSumCountData',
|
|
6
|
+
// 查询:近一周抄表量数据
|
|
7
|
+
meteReadDataByWeek: '/webmeterapi/foreignaidMetereadDataByWeekData',
|
|
8
|
+
// 查询:在用表具数
|
|
9
|
+
usingMeterSumCount: '/webmeterapi/foreignaidUsingMeterSumCountData',
|
|
10
|
+
// 查询:近一周在用表具数数据
|
|
11
|
+
usingMeterDataByWeek: '/webmeterapi/foreignaidUsingMeterDataByWeekData',
|
|
12
|
+
// 查询:指令成功率统计
|
|
13
|
+
instructRateOfSuccess: '/webmeterapi/foreignaidInstructRateOfSuccessData',
|
|
14
|
+
// 查询:按表厂抄表量统计
|
|
15
|
+
handMeterSumCountData: '/webmeterapi/foreignaidHandMeterSumCountData',
|
|
16
|
+
// 查询:统计用气量数据
|
|
17
|
+
useGasSumCount: '/webmeterapi/foreignaidUseGasSumCountData'
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { WebmeterAnalysisViewApi }
|
|
@@ -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
|
+
}
|