vue2-client 1.2.46 → 1.2.49
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 +130 -114
- package/docs/notice.md +22 -22
- package/package.json +1 -1
- package/src/App.vue +99 -99
- package/src/base-client/components/common/AmapMarker/AmapPointRendering.vue +1 -1
- package/src/base-client/components/common/FormGroupEdit/FormGroupEdit.vue +149 -149
- package/src/base-client/components/common/XAddForm/XAddForm.vue +339 -339
- package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +316 -316
- package/src/base-client/components/common/XForm/XForm.vue +275 -275
- package/src/base-client/components/iot/CustomerDetailsView/CustomerDetailsView.vue +225 -225
- package/src/base-client/components/iot/DataAnalysisView/DataAnalysisView.vue +244 -244
- package/src/base-client/components/iot/DeviceBrandDetailsView/DeviceBrandDetailsView.vue +452 -452
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsCount.vue +330 -330
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsException.vue +57 -57
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsInstructOperate.vue +121 -121
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsRead.vue +131 -131
- package/src/base-client/components/iot/DeviceTypeDetailsView/DeviceTypeDetailsView.vue +276 -276
- package/src/base-client/components/iot/InstructDetailsView/InstructDetailsView.vue +469 -469
- package/src/base-client/components/iot/LogDetailsView/LogDetailsView.vue +379 -379
- package/src/base-client/components/iot/MeterDetailsView/MeterDetailsView.vue +359 -359
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsCount.vue +335 -335
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsException.vue +184 -184
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsHandPlan.vue +291 -291
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsInstruct.vue +236 -236
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsMain.vue +256 -256
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsSellGas.vue +189 -189
- package/src/base-client/components/iot/WebmeterAnalysisView/WebmeterAnalysisView.vue +722 -722
- package/src/base-client/components/system/DictionaryDetailsView/DictionaryDetailsView.vue +231 -231
- package/src/base-client/components/system/QueryParamsDetailsView/QueryParamsDetailsView.vue +247 -247
- package/src/base-client/components/ticket/EmployeeDetailsView/EmployeeDetailsView.vue +370 -370
- package/src/base-client/components/ticket/TicketDetailsView/TicketDetailsView.vue +853 -844
- package/src/base-client/components/ticket/TicketDetailsView/part/TicketDetailsFlow.vue +260 -260
- package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +532 -532
- package/src/base-client/plugins/AppData.js +17 -27
- package/src/base-client/plugins/GetLoginInfoService.js +252 -252
- package/src/components/exception/ExceptionPage.vue +70 -70
- package/src/components/setting/Setting.vue +235 -235
- package/src/config/index.js +3 -3
- package/src/layouts/SinglePageView.vue +78 -78
- package/src/layouts/header/HeaderNotice.vue +0 -1
- package/src/pages/exception/403.vue +21 -21
- package/src/pages/exception/404.vue +21 -21
- package/src/pages/exception/500.vue +21 -21
- package/src/pages/report/ReportTableHome.vue +28 -28
- package/src/pages/resourceManage/depListManage.vue +23 -23
- package/src/pages/resourceManage/funListManage.vue +23 -23
- package/src/pages/resourceManage/index.js +15 -15
- package/src/pages/resourceManage/orgListManage.vue +98 -98
- package/src/pages/resourceManage/roleListManage.vue +23 -23
- package/src/pages/resourceManage/staffListManage.vue +23 -23
- package/src/pages/system/ticket/submitTicketSuccess.vue +33 -13
- package/src/router/async/config.async.js +26 -26
- package/src/router/index.js +27 -27
- package/src/services/api/common.js +47 -47
- package/src/services/api/index.js +39 -39
- package/src/services/user.js +34 -34
- package/src/theme/default/style.less +47 -47
- package/src/utils/indexedDB.js +146 -146
- package/src/utils/map-utils.js +17 -0
- package/src/utils/routerUtil.js +359 -359
- package/vue.config.js +143 -143
|
@@ -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
|
-
rowKey="id"
|
|
43
|
-
size="middle"
|
|
44
|
-
bordered
|
|
45
|
-
:pagination="false"
|
|
46
|
-
:columns="columns"
|
|
47
|
-
:data-source="funTree">
|
|
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
|
+
rowKey="id"
|
|
43
|
+
size="middle"
|
|
44
|
+
bordered
|
|
45
|
+
:pagination="false"
|
|
46
|
+
:columns="columns"
|
|
47
|
+
:data-source="funTree">
|
|
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,23 +1,23 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div id="roleListManage">
|
|
3
|
-
|
|
4
|
-
</div>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script>
|
|
8
|
-
export default {
|
|
9
|
-
name: 'roleListManage',
|
|
10
|
-
data () {
|
|
11
|
-
return {}
|
|
12
|
-
},
|
|
13
|
-
created () {
|
|
14
|
-
},
|
|
15
|
-
mounted () {
|
|
16
|
-
},
|
|
17
|
-
methods: {}
|
|
18
|
-
}
|
|
19
|
-
</script>
|
|
20
|
-
|
|
21
|
-
<style lang="less">
|
|
22
|
-
|
|
23
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div id="roleListManage">
|
|
3
|
+
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
export default {
|
|
9
|
+
name: 'roleListManage',
|
|
10
|
+
data () {
|
|
11
|
+
return {}
|
|
12
|
+
},
|
|
13
|
+
created () {
|
|
14
|
+
},
|
|
15
|
+
mounted () {
|
|
16
|
+
},
|
|
17
|
+
methods: {}
|
|
18
|
+
}
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<style lang="less">
|
|
22
|
+
|
|
23
|
+
</style>
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div id="staffListManage">
|
|
3
|
-
|
|
4
|
-
</div>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script>
|
|
8
|
-
export default {
|
|
9
|
-
name: 'staffListManage',
|
|
10
|
-
data () {
|
|
11
|
-
return {}
|
|
12
|
-
},
|
|
13
|
-
created () {
|
|
14
|
-
},
|
|
15
|
-
mounted () {
|
|
16
|
-
},
|
|
17
|
-
methods: {}
|
|
18
|
-
}
|
|
19
|
-
</script>
|
|
20
|
-
|
|
21
|
-
<style lang="less">
|
|
22
|
-
|
|
23
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div id="staffListManage">
|
|
3
|
+
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
export default {
|
|
9
|
+
name: 'staffListManage',
|
|
10
|
+
data () {
|
|
11
|
+
return {}
|
|
12
|
+
},
|
|
13
|
+
created () {
|
|
14
|
+
},
|
|
15
|
+
mounted () {
|
|
16
|
+
},
|
|
17
|
+
methods: {}
|
|
18
|
+
}
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<style lang="less">
|
|
22
|
+
|
|
23
|
+
</style>
|
|
@@ -84,6 +84,7 @@ export default {
|
|
|
84
84
|
// 控制加急按钮显示
|
|
85
85
|
UrgentAvailable: true,
|
|
86
86
|
// 刷新页面的定时器
|
|
87
|
+
time: undefined,
|
|
87
88
|
timer: undefined,
|
|
88
89
|
// 取消工单确认框可见性
|
|
89
90
|
closeVisible: false,
|
|
@@ -98,7 +99,8 @@ export default {
|
|
|
98
99
|
this.countDown = 0
|
|
99
100
|
},
|
|
100
101
|
beforeDestroy () {
|
|
101
|
-
|
|
102
|
+
this.stopTimer()
|
|
103
|
+
this.stopTimer2()
|
|
102
104
|
},
|
|
103
105
|
methods: {
|
|
104
106
|
format (date, format) {
|
|
@@ -115,7 +117,7 @@ export default {
|
|
|
115
117
|
this.title = '工单已关闭'
|
|
116
118
|
this.description = ''
|
|
117
119
|
this.icon = false
|
|
118
|
-
|
|
120
|
+
this.stopTimer()
|
|
119
121
|
}, err => {
|
|
120
122
|
console.error(err)
|
|
121
123
|
})
|
|
@@ -130,9 +132,11 @@ export default {
|
|
|
130
132
|
},
|
|
131
133
|
// 过10s刷新一下页面数据
|
|
132
134
|
refresh () {
|
|
133
|
-
this.timer
|
|
134
|
-
this.
|
|
135
|
-
|
|
135
|
+
if (this.timer === undefined) {
|
|
136
|
+
this.timer = setInterval(() => {
|
|
137
|
+
this.getTicketDetail()
|
|
138
|
+
}, 10 * 1000)
|
|
139
|
+
}
|
|
136
140
|
},
|
|
137
141
|
// 对工单进行加急处理
|
|
138
142
|
urgent () {
|
|
@@ -173,14 +177,16 @@ export default {
|
|
|
173
177
|
// 设置用于控制加急按钮倒计时定时器,加急按钮5分钟后才可点击
|
|
174
178
|
setTimer () {
|
|
175
179
|
this.countDown = 5
|
|
176
|
-
|
|
177
|
-
this.
|
|
178
|
-
|
|
179
|
-
this.
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
180
|
+
if (this.time === undefined) {
|
|
181
|
+
this.time = setInterval(() => {
|
|
182
|
+
this.countDown--
|
|
183
|
+
if (this.countDown <= 0) {
|
|
184
|
+
this.urgentAccess = false
|
|
185
|
+
this.stopTimer2()
|
|
186
|
+
this.countDown = -1
|
|
187
|
+
}
|
|
188
|
+
}, 1000)
|
|
189
|
+
}
|
|
184
190
|
},
|
|
185
191
|
// 获取工单详情
|
|
186
192
|
getTicketDetail () {
|
|
@@ -218,6 +224,20 @@ export default {
|
|
|
218
224
|
}, err => {
|
|
219
225
|
console.log(err)
|
|
220
226
|
})
|
|
227
|
+
},
|
|
228
|
+
// 停止定时器
|
|
229
|
+
stopTimer () {
|
|
230
|
+
if (this.timer) {
|
|
231
|
+
clearInterval(this.timer)
|
|
232
|
+
this.timer = undefined
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
// 停止定时器2
|
|
236
|
+
stopTimer2 () {
|
|
237
|
+
if (this.time) {
|
|
238
|
+
clearInterval(this.time)
|
|
239
|
+
this.time = undefined
|
|
240
|
+
}
|
|
221
241
|
}
|
|
222
242
|
},
|
|
223
243
|
computed: {
|
|
@@ -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,47 +1,47 @@
|
|
|
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
|
-
addOrModify: '/webmeterapi/commonAddOrModify',
|
|
11
|
-
// 通用删除
|
|
12
|
-
delete: '/webmeterapi/commonDelete',
|
|
13
|
-
// 获取字典键列表
|
|
14
|
-
getDictionaryParam: '/webmeterapi/getDictionaryParam'
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* 带缓存查询的表格配置文件查询
|
|
19
|
-
* @param queryParamsName 配置名称
|
|
20
|
-
* @param callback 回调函数
|
|
21
|
-
*/
|
|
22
|
-
export function getColumnsJson (queryParamsName, callback) {
|
|
23
|
-
indexedDB.getByWeb(queryParamsName, commonApi.getColumnsJson, { str: queryParamsName }, callback)
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* 通用表单查询
|
|
28
|
-
*/
|
|
29
|
-
export function query (parameter) {
|
|
30
|
-
return request(commonApi.query, METHOD.POST, parameter)
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* 通用新增/修改
|
|
35
|
-
*/
|
|
36
|
-
export function addOrModify (parameter) {
|
|
37
|
-
return request(commonApi.addOrModify, METHOD.POST, parameter)
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* 通用删除
|
|
42
|
-
*/
|
|
43
|
-
export function remove (parameter) {
|
|
44
|
-
return request(commonApi.delete, METHOD.POST, parameter)
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
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
|
+
addOrModify: '/webmeterapi/commonAddOrModify',
|
|
11
|
+
// 通用删除
|
|
12
|
+
delete: '/webmeterapi/commonDelete',
|
|
13
|
+
// 获取字典键列表
|
|
14
|
+
getDictionaryParam: '/webmeterapi/getDictionaryParam'
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* 带缓存查询的表格配置文件查询
|
|
19
|
+
* @param queryParamsName 配置名称
|
|
20
|
+
* @param callback 回调函数
|
|
21
|
+
*/
|
|
22
|
+
export function getColumnsJson (queryParamsName, callback) {
|
|
23
|
+
indexedDB.getByWeb(queryParamsName, commonApi.getColumnsJson, { str: queryParamsName }, callback)
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* 通用表单查询
|
|
28
|
+
*/
|
|
29
|
+
export function query (parameter) {
|
|
30
|
+
return request(commonApi.query, METHOD.POST, parameter)
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* 通用新增/修改
|
|
35
|
+
*/
|
|
36
|
+
export function addOrModify (parameter) {
|
|
37
|
+
return request(commonApi.addOrModify, METHOD.POST, parameter)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* 通用删除
|
|
42
|
+
*/
|
|
43
|
+
export function remove (parameter) {
|
|
44
|
+
return request(commonApi.delete, METHOD.POST, parameter)
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
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
|
+
}
|