vue2-client 1.1.0 → 1.2.2
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/.eslintrc.js +81 -81
- package/README.md +65 -63
- package/babel.config.js +15 -14
- package/docs/index.md +29 -29
- package/docs/notice.md +22 -0
- package/index.js +28 -0
- package/jest.config.js +3 -3
- package/package.json +1 -1
- package/public/index.html +27 -27
- package/src/App.vue +2 -2
- package/src/assets/img/SunClientDownload.png +0 -0
- package/src/assets/img/SunClientManual/1.png +0 -0
- package/src/assets/img/SunClientManual/2.png +0 -0
- package/src/assets/img/SunClientManual/3.png +0 -0
- package/src/assets/img/SunClientManual/4.png +0 -0
- package/src/assets/img/ToDeskDownload.png +0 -0
- package/src/assets/img/ToDeskManual/1.png +0 -0
- package/src/assets/img/ToDeskManual/2.png +0 -0
- package/src/assets/img/ToDeskManual/3.png +0 -0
- package/src/assets/img/ToDeskManual/4.png +0 -0
- package/src/assets/sound/newNote.mp3 +0 -0
- package/src/base-client/all.js +57 -57
- package/src/base-client/components/common/CreateQuery/CreateQuery.vue +1157 -1159
- package/src/base-client/components/common/CreateQuery/index.md +1 -1
- package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQuery.vue +540 -540
- package/src/base-client/components/common/CreateSimpleFormQuery/index.md +1 -1
- package/src/base-client/components/common/CustomColumnsDrawer/index.md +1 -1
- package/src/base-client/components/common/FormGroupEdit/FormGroupEdit.vue +150 -150
- package/src/base-client/components/common/FormGroupEdit/index.md +1 -1
- package/src/base-client/components/common/FormGroupQuery/index.md +1 -1
- package/src/base-client/components/common/XAddForm/XAddForm.vue +323 -323
- package/src/base-client/components/common/XAddForm/index.md +1 -1
- package/src/base-client/components/common/XBadge/index.md +1 -1
- package/src/base-client/components/common/XCard/index.md +1 -1
- package/src/base-client/components/common/XForm/XForm.vue +275 -275
- package/src/base-client/components/common/XForm/XFormItem.vue +217 -217
- package/src/base-client/components/common/XForm/index.md +196 -196
- package/src/base-client/components/common/XFormCol/index.md +1 -1
- package/src/base-client/components/common/XFormTable/XFormTable.vue +407 -405
- package/src/base-client/components/common/XFormTable/index.md +3 -3
- package/src/base-client/components/common/XTable/XTable.vue +262 -262
- package/src/base-client/components/common/XTable/index.md +255 -255
- package/src/base-client/components/common/XTreeOne/XTreeOne.vue +1 -1
- package/src/base-client/components/iot/CustomerDetailsView/CustomerDetailsView.vue +226 -226
- package/src/base-client/components/iot/CustomerDetailsView/index.md +2 -2
- package/src/base-client/components/iot/DataAnalysisUser/DataAnalysisUser.vue +1 -1
- package/src/base-client/components/iot/DataAnalysisViewGD/DataAnalysisViewGD.vue +548 -548
- package/src/base-client/components/iot/DeviceBrandDetailsView/DeviceBrandDetailsView.vue +453 -453
- package/src/base-client/components/iot/DeviceDetailsView/DeviceDetailsView.vue +231 -231
- package/src/base-client/components/iot/DeviceDetailsView/index.md +1 -1
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsCount.vue +330 -330
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsException.vue +1 -1
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsInstruct.vue +3 -3
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsInstructOperate.vue +122 -122
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsMain.vue +1 -1
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsRead.vue +3 -3
- package/src/base-client/components/iot/DeviceTypeDetailsView/DeviceTypeDetailsView.vue +277 -277
- package/src/base-client/components/iot/InstructDetailsView/InstructDetailsView.vue +472 -472
- package/src/base-client/components/iot/InstructDetailsView/index.md +1 -1
- package/src/base-client/components/iot/LogDetailsView/LogDetailsView.vue +380 -380
- package/src/base-client/components/iot/LogDetailsView/index.md +1 -1
- package/src/base-client/components/iot/MeterDetailsView/MeterDetailsView.vue +360 -360
- package/src/base-client/components/iot/MeterDetailsView/index.md +1 -1
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsCount.vue +335 -335
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsException.vue +185 -185
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsHandPlan.vue +292 -292
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsInstruct.vue +237 -237
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsMain.vue +257 -257
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsSellGas.vue +190 -190
- package/src/base-client/components/iot/WebmeterAnalysisView/WebmeterAnalysisView.vue +723 -723
- package/src/base-client/components/iot/WebmeterAnalysisView/index.md +1 -1
- package/src/base-client/components/system/DictionaryDetailsView/DictionaryDetailsView.vue +232 -232
- package/src/base-client/components/system/DictionaryDetailsView/index.md +1 -1
- package/src/base-client/components/system/QueryParamsDetailsView/QueryParamsDetailsView.vue +248 -248
- package/src/base-client/components/ticket/EmployeeDetailsView/EmployeeDetailsView.vue +371 -406
- package/src/base-client/components/ticket/TicketDetailsView/TicketDetailsView.vue +838 -486
- package/src/base-client/components/ticket/TicketDetailsView/part/TicketDetailsFlow.vue +261 -184
- package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +528 -303
- package/src/base-client/plugins/AppData.js +69 -69
- package/src/base-client/plugins/GetLoginInfoService.js +221 -221
- package/src/base-client/plugins/index.js +21 -21
- package/src/bootstrap.js +27 -27
- package/src/components/Ellipsis/Ellipsis.vue +1 -1
- package/src/components/Ellipsis/index.md +2 -2
- package/src/components/NumberInfo/index.md +1 -1
- package/src/components/STable/README.md +3 -3
- package/src/components/Trend/index.md +1 -1
- package/src/components/cache/AKeepAlive.js +1 -1
- package/src/components/checkbox/index.js +2 -2
- package/src/components/index.js +15 -15
- package/src/components/menu/menu.js +1 -1
- package/src/components/setting/Setting.vue +4 -4
- package/src/components/table/advance/AdvanceTable.vue +3 -3
- package/src/components/transition/PageToggleTransition.vue +1 -1
- package/src/config/default/setting.config.js +33 -33
- package/src/layouts/CommonLayout.vue +1 -1
- package/src/layouts/ComponentLayoutOne.vue +47 -47
- package/src/layouts/PageLayout.vue +2 -2
- package/src/layouts/SinglePageView.vue +1 -1
- package/src/layouts/header/AdminHeader.vue +2 -2
- package/src/layouts/header/HeaderAvatar.vue +1 -1
- package/src/layouts/header/HeaderNotice.vue +97 -97
- package/src/layouts/tabs/TabsHead.vue +1 -1
- package/src/layouts/tabs/TabsView.vue +6 -6
- package/src/main.js +20 -20
- package/src/mock/common/reportData.js +20 -20
- package/src/mock/goods/index.js +2 -2
- package/src/mock/index.js +6 -6
- package/src/mock/project/index.js +1 -1
- package/src/mock/user/current.js +1 -1
- package/src/mock/user/login.js +1 -1
- package/src/mock/user/routes.js +61 -61
- package/src/mock/workplace/index.js +1 -1
- package/src/pages/exception/403.vue +25 -25
- package/src/pages/exception/404.vue +25 -25
- package/src/pages/exception/500.vue +25 -25
- package/src/pages/login/Login.vue +194 -194
- package/src/pages/report/ReportTable.js +125 -125
- package/src/pages/report/ReportTableHome.vue +28 -28
- package/src/pages/resourceManage/resourceManageMain.vue +55 -55
- package/src/pages/system/applyInstallView/Core.vue +1 -1
- package/src/pages/system/applyInstallView/index.vue +1 -1
- package/src/pages/system/dictionary/index.vue +1 -1
- package/src/pages/system/queryParams/index.vue +1 -1
- package/src/router/async/config.async.js +1 -1
- package/src/router/async/router.map.js +59 -59
- package/src/router/guards.js +3 -3
- package/src/router/index.js +27 -27
- package/src/services/api/EmployeeDetailsViewApi.js +3 -1
- package/src/services/api/TicketDetailsViewApi.js +9 -1
- package/src/services/api/common.js +37 -39
- package/src/services/api/restTools.js +23 -23
- package/src/services/dataSource.js +1 -1
- package/src/services/user.js +2 -2
- package/src/store/index.js +5 -5
- package/src/store/modules/setting.js +5 -5
- package/src/theme/index.less +5 -5
- package/src/theme/reportTable.less +58 -58
- package/src/utils/i18n.js +2 -2
- package/src/utils/indexedDB.js +146 -146
- package/src/utils/request.js +197 -197
- package/src/utils/routerUtil.js +18 -5
- package/tests/unit/ReportTable.spec.js +15 -15
- package/vue.config.js +153 -152
- package/webpack.config.js +12 -12
- package/src/index.js +0 -28
- package/src/router/config.js +0 -23
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<report-table :tableData="tableData"></report-table>
|
|
3
|
-
</template>
|
|
4
|
-
|
|
5
|
-
<script>
|
|
6
|
-
import { post } from '
|
|
7
|
-
import ReportTable from '
|
|
8
|
-
export default {
|
|
9
|
-
name: 'ReportTableHome',
|
|
10
|
-
components: { ReportTable },
|
|
11
|
-
data () {
|
|
12
|
-
return {
|
|
13
|
-
tableData: null
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
created () {
|
|
17
|
-
},
|
|
18
|
-
mounted () {
|
|
19
|
-
this.getData()
|
|
20
|
-
},
|
|
21
|
-
methods: {
|
|
22
|
-
async getData () {
|
|
23
|
-
this.tableData = await post('webmeterapi/reportTest', {})
|
|
24
|
-
console.log('数据=>', JSON.stringify(this.tableData))
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<report-table :tableData="tableData"></report-table>
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script>
|
|
6
|
+
import { post } from '@vue2-client/services/api/restTools'
|
|
7
|
+
import ReportTable from '@vue2-client/pages/report/ReportTable'
|
|
8
|
+
export default {
|
|
9
|
+
name: 'ReportTableHome',
|
|
10
|
+
components: { ReportTable },
|
|
11
|
+
data () {
|
|
12
|
+
return {
|
|
13
|
+
tableData: null
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
created () {
|
|
17
|
+
},
|
|
18
|
+
mounted () {
|
|
19
|
+
this.getData()
|
|
20
|
+
},
|
|
21
|
+
methods: {
|
|
22
|
+
async getData () {
|
|
23
|
+
this.tableData = await post('webmeterapi/reportTest', {})
|
|
24
|
+
console.log('数据=>', JSON.stringify(this.tableData))
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
</script>
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
<!--<template>-->
|
|
2
|
-
<!--<div id="resourceManageMain">-->
|
|
3
|
-
<!--<a-tabs>-->
|
|
4
|
-
<!--<a-tab-pane key="1" force-render>-->
|
|
5
|
-
<!--<span slot="tab"><a-icon type="apartment" />资源管理</span>-->
|
|
6
|
-
<!--Content of Tab Pane 1-->
|
|
7
|
-
<!--</a-tab-pane>-->
|
|
8
|
-
<!--<a-tab-pane key="2" tab="功能管理" force-render>-->
|
|
9
|
-
<!--Content of Tab Pane 2-->
|
|
10
|
-
<!--</a-tab-pane>-->
|
|
11
|
-
<!--<a-tab-pane key="3" tab="部门管理" force-render>-->
|
|
12
|
-
<!--Content of Tab Pane 3-->
|
|
13
|
-
<!--</a-tab-pane>-->
|
|
14
|
-
<!--</a-tabs>-->
|
|
15
|
-
<!--</div>-->
|
|
16
|
-
<!--</template>-->
|
|
17
|
-
|
|
18
|
-
<script>
|
|
19
|
-
import { mapState } from 'vuex'
|
|
20
|
-
import { getResourceFunction } from '
|
|
21
|
-
|
|
22
|
-
export default {
|
|
23
|
-
name: 'resourceManageMain',
|
|
24
|
-
computed: {
|
|
25
|
-
...mapState('account', ['login'])
|
|
26
|
-
},
|
|
27
|
-
data () {
|
|
28
|
-
return {
|
|
29
|
-
resFun: []
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
created () {
|
|
33
|
-
},
|
|
34
|
-
async mounted () {
|
|
35
|
-
const fun = await getResourceFunction()
|
|
36
|
-
console.log('->', fun)
|
|
37
|
-
this.resFun = this.searchFun(fun, '资源功能')
|
|
38
|
-
},
|
|
39
|
-
methods: {
|
|
40
|
-
searchFun (fun, name) {
|
|
41
|
-
if (fun.length > 0) {
|
|
42
|
-
if (fun[0].name == name) {
|
|
43
|
-
return fun[0].children
|
|
44
|
-
} else {
|
|
45
|
-
return this.searchFun(fun[0].children, name)
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
</script>
|
|
52
|
-
|
|
53
|
-
<style lang="less">
|
|
54
|
-
|
|
55
|
-
</style>
|
|
1
|
+
<!--<template>-->
|
|
2
|
+
<!--<div id="resourceManageMain">-->
|
|
3
|
+
<!--<a-tabs>-->
|
|
4
|
+
<!--<a-tab-pane key="1" force-render>-->
|
|
5
|
+
<!--<span slot="tab"><a-icon type="apartment" />资源管理</span>-->
|
|
6
|
+
<!--Content of Tab Pane 1-->
|
|
7
|
+
<!--</a-tab-pane>-->
|
|
8
|
+
<!--<a-tab-pane key="2" tab="功能管理" force-render>-->
|
|
9
|
+
<!--Content of Tab Pane 2-->
|
|
10
|
+
<!--</a-tab-pane>-->
|
|
11
|
+
<!--<a-tab-pane key="3" tab="部门管理" force-render>-->
|
|
12
|
+
<!--Content of Tab Pane 3-->
|
|
13
|
+
<!--</a-tab-pane>-->
|
|
14
|
+
<!--</a-tabs>-->
|
|
15
|
+
<!--</div>-->
|
|
16
|
+
<!--</template>-->
|
|
17
|
+
|
|
18
|
+
<script>
|
|
19
|
+
import { mapState } from 'vuex'
|
|
20
|
+
import { getResourceFunction } from '@vue2-client/base-client/plugins/GetLoginInfoService'
|
|
21
|
+
|
|
22
|
+
export default {
|
|
23
|
+
name: 'resourceManageMain',
|
|
24
|
+
computed: {
|
|
25
|
+
...mapState('account', ['login'])
|
|
26
|
+
},
|
|
27
|
+
data () {
|
|
28
|
+
return {
|
|
29
|
+
resFun: []
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
created () {
|
|
33
|
+
},
|
|
34
|
+
async mounted () {
|
|
35
|
+
const fun = await getResourceFunction()
|
|
36
|
+
console.log('->', fun)
|
|
37
|
+
this.resFun = this.searchFun(fun, '资源功能')
|
|
38
|
+
},
|
|
39
|
+
methods: {
|
|
40
|
+
searchFun (fun, name) {
|
|
41
|
+
if (fun.length > 0) {
|
|
42
|
+
if (fun[0].name == name) {
|
|
43
|
+
return fun[0].children
|
|
44
|
+
} else {
|
|
45
|
+
return this.searchFun(fun[0].children, name)
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
</script>
|
|
52
|
+
|
|
53
|
+
<style lang="less">
|
|
54
|
+
|
|
55
|
+
</style>
|
|
@@ -92,7 +92,7 @@ import Control from './LFComponents/Control'
|
|
|
92
92
|
import PropertyDialog from './PropertySetting/PropertyDialog'
|
|
93
93
|
import DataDialog from './LFComponents/DataDialog'
|
|
94
94
|
import { nodeList } from './config'
|
|
95
|
-
import { showXml } from '
|
|
95
|
+
import { showXml } from '@vue2-client/utils/util'
|
|
96
96
|
import FileSaver from 'file-saver'
|
|
97
97
|
import JsonViewer from 'vue-json-viewer'
|
|
98
98
|
|
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
// 视图组件
|
|
2
|
-
const view = {
|
|
3
|
-
tabs: () => import('
|
|
4
|
-
blank: () => import('
|
|
5
|
-
page: () => import('
|
|
6
|
-
singlePage: () => import('
|
|
7
|
-
}
|
|
8
|
-
// 动态路由对象定义
|
|
9
|
-
const routerResource = {}
|
|
10
|
-
// --------------------------------------基本视图组件--------------------------------------
|
|
11
|
-
// 空白视图
|
|
12
|
-
routerResource.blank = view.blank
|
|
13
|
-
// 单页面视图
|
|
14
|
-
routerResource.singlePage = view.singlePage
|
|
15
|
-
// --------------------------------------系统配置--------------------------------------
|
|
16
|
-
routerResource.system = view.blank
|
|
17
|
-
// 字典管理
|
|
18
|
-
routerResource.dictionaryManage = () => import(/* webpackChunkName: "dictionary" */ '
|
|
19
|
-
// 查询配置管理
|
|
20
|
-
routerResource.queryParamsManage = () => import(/* webpackChunkName: "queryParams" */ '
|
|
21
|
-
// 报装可视化
|
|
22
|
-
routerResource.applyInstallView = () => import(/* webpackChunkName: "applyInstallView" */ '
|
|
23
|
-
// --------------------------------------报表组件--------------------------------------
|
|
24
|
-
routerResource.reportTable = () => import(/* webpackChunkName: "ReportTableHome" */ '
|
|
25
|
-
// --------------------------------------资源管理--------------------------------------
|
|
26
|
-
routerResource.resourceManageMain = () => import(/* webpackChunkName: "resourceManageMain" */ '
|
|
27
|
-
|
|
28
|
-
// 基础路由组件注册
|
|
29
|
-
const routerMap = {
|
|
30
|
-
login: {
|
|
31
|
-
authority: '*',
|
|
32
|
-
path: '/login',
|
|
33
|
-
component: () => import('
|
|
34
|
-
},
|
|
35
|
-
root: {
|
|
36
|
-
path: '/',
|
|
37
|
-
name: '首页',
|
|
38
|
-
redirect: '/login',
|
|
39
|
-
component: view.tabs
|
|
40
|
-
},
|
|
41
|
-
exp403: {
|
|
42
|
-
authority: '*',
|
|
43
|
-
name: 'exp403',
|
|
44
|
-
path: '403',
|
|
45
|
-
component: () => import('
|
|
46
|
-
},
|
|
47
|
-
exp404: {
|
|
48
|
-
name: 'exp404',
|
|
49
|
-
path: '404',
|
|
50
|
-
component: () => import('
|
|
51
|
-
},
|
|
52
|
-
exp500: {
|
|
53
|
-
name: 'exp500',
|
|
54
|
-
path: '500',
|
|
55
|
-
component: () => import('
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
Object.assign(routerMap, routerResource)
|
|
59
|
-
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
|
+
singlePage: () => import('@vue2-client/layouts/SinglePageView')
|
|
7
|
+
}
|
|
8
|
+
// 动态路由对象定义
|
|
9
|
+
const routerResource = {}
|
|
10
|
+
// --------------------------------------基本视图组件--------------------------------------
|
|
11
|
+
// 空白视图
|
|
12
|
+
routerResource.blank = view.blank
|
|
13
|
+
// 单页面视图
|
|
14
|
+
routerResource.singlePage = view.singlePage
|
|
15
|
+
// --------------------------------------系统配置--------------------------------------
|
|
16
|
+
routerResource.system = view.blank
|
|
17
|
+
// 字典管理
|
|
18
|
+
routerResource.dictionaryManage = () => import(/* webpackChunkName: "dictionary" */ '@vue2-client/pages/system/dictionary')
|
|
19
|
+
// 查询配置管理
|
|
20
|
+
routerResource.queryParamsManage = () => import(/* webpackChunkName: "queryParams" */ '@vue2-client/pages/system/queryParams')
|
|
21
|
+
// 报装可视化
|
|
22
|
+
routerResource.applyInstallView = () => import(/* webpackChunkName: "applyInstallView" */ '@vue2-client/pages/system/applyInstallView')
|
|
23
|
+
// --------------------------------------报表组件--------------------------------------
|
|
24
|
+
routerResource.reportTable = () => import(/* webpackChunkName: "ReportTableHome" */ '@vue2-client/pages/report/ReportTableHome')
|
|
25
|
+
// --------------------------------------资源管理--------------------------------------
|
|
26
|
+
routerResource.resourceManageMain = () => import(/* webpackChunkName: "resourceManageMain" */ '@vue2-client/pages/resourceManage/resourceManageMain')
|
|
27
|
+
|
|
28
|
+
// 基础路由组件注册
|
|
29
|
+
const routerMap = {
|
|
30
|
+
login: {
|
|
31
|
+
authority: '*',
|
|
32
|
+
path: '/login',
|
|
33
|
+
component: () => import('@vue2-client/pages/login')
|
|
34
|
+
},
|
|
35
|
+
root: {
|
|
36
|
+
path: '/',
|
|
37
|
+
name: '首页',
|
|
38
|
+
redirect: '/login',
|
|
39
|
+
component: view.tabs
|
|
40
|
+
},
|
|
41
|
+
exp403: {
|
|
42
|
+
authority: '*',
|
|
43
|
+
name: 'exp403',
|
|
44
|
+
path: '403',
|
|
45
|
+
component: () => import('@vue2-client/pages/exception/403')
|
|
46
|
+
},
|
|
47
|
+
exp404: {
|
|
48
|
+
name: 'exp404',
|
|
49
|
+
path: '404',
|
|
50
|
+
component: () => import('@vue2-client/pages/exception/404')
|
|
51
|
+
},
|
|
52
|
+
exp500: {
|
|
53
|
+
name: 'exp500',
|
|
54
|
+
path: '500',
|
|
55
|
+
component: () => import('@vue2-client/pages/exception/500')
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
Object.assign(routerMap, routerResource)
|
|
59
|
+
export default routerMap
|
package/src/router/guards.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { hasAuthority } from '
|
|
2
|
-
import { loginIgnore } from '
|
|
3
|
-
import { checkAuthorization } from '
|
|
1
|
+
import { hasAuthority } from '@vue2-client/utils/authority-utils'
|
|
2
|
+
import { loginIgnore } from '@vue2-client/router/index'
|
|
3
|
+
import { checkAuthorization } from '@vue2-client/utils/request'
|
|
4
4
|
import NProgress from 'nprogress'
|
|
5
5
|
|
|
6
6
|
NProgress.configure({ showSpinner: false })
|
package/src/router/index.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { formatRoutes } from '
|
|
2
|
-
|
|
3
|
-
// 不需要登录拦截的路由配置
|
|
4
|
-
const loginIgnore = {
|
|
5
|
-
names: ['404', '403'], // 根据路由名称匹配
|
|
6
|
-
paths: ['/login'], // 根据路由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 =
|
|
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'], // 根据路由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 }
|
|
@@ -10,7 +10,9 @@ const EmployeeDetailsViewApi = {
|
|
|
10
10
|
// 查询:获取部门名字典
|
|
11
11
|
getDepartmentDictionary: '/webmeterapi/getDepartmentDictionary',
|
|
12
12
|
// 查询:获取模块名字典
|
|
13
|
-
getModelDictionary: '/webmeterapi/getModelDictionary'
|
|
13
|
+
getModelDictionary: '/webmeterapi/getModelDictionary',
|
|
14
|
+
// 查询:获取所有员工名,供前端展示备选项
|
|
15
|
+
getAllEmployeeName: '/webmeterapi/getAllEmployeeName'
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
export { EmployeeDetailsViewApi }
|
|
@@ -24,7 +24,15 @@ const TicketDetailsViewApi = {
|
|
|
24
24
|
// 获取工单类别字典
|
|
25
25
|
getTicketCategoryDictionary: '/webmeterapi/getTicketCategoryDictionary',
|
|
26
26
|
// 在工单提交页面删除照片
|
|
27
|
-
revocationImage: '/webmeterapi/revocationImage'
|
|
27
|
+
revocationImage: '/webmeterapi/revocationImage',
|
|
28
|
+
// 在工单提交页面删除照片
|
|
29
|
+
getTicketImages: '/webmeterapi/getTicketImages',
|
|
30
|
+
// 用户填写附加信息时取消了操作,将已上传的照片清空
|
|
31
|
+
removeAllImages: '/webmeterapi/removeAllImages',
|
|
32
|
+
// 提交用户填写附加信息
|
|
33
|
+
AddonDescriptionToTicket: '/webmeterapi/AddonDescriptionToTicket',
|
|
34
|
+
// 获取用户填写附加信息
|
|
35
|
+
getAddonDescription: '/webmeterapi/getAddonDescription'
|
|
28
36
|
}
|
|
29
37
|
|
|
30
38
|
export { TicketDetailsViewApi }
|
|
@@ -1,39 +1,37 @@
|
|
|
1
|
-
import { METHOD, request } from '
|
|
2
|
-
|
|
3
|
-
const commonApi = {
|
|
4
|
-
// 获取表格列配置
|
|
5
|
-
getColumnsJson: '/webmeterapi/getColumns',
|
|
6
|
-
// 通用查询
|
|
7
|
-
query: '/webmeterapi/commonQuery',
|
|
8
|
-
// 通用新增/修改
|
|
9
|
-
addOrModify: '/webmeterapi/commonAddOrModify',
|
|
10
|
-
// 通用删除
|
|
11
|
-
delete: '/webmeterapi/commonDelete',
|
|
12
|
-
// 获取字典键列表
|
|
13
|
-
getDictionaryParam: '/webmeterapi/getDictionaryParam'
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export { commonApi }
|
|
1
|
+
import { METHOD, request } from '@vue2-client/utils/request'
|
|
2
|
+
|
|
3
|
+
const commonApi = {
|
|
4
|
+
// 获取表格列配置
|
|
5
|
+
getColumnsJson: '/webmeterapi/getColumns',
|
|
6
|
+
// 通用查询
|
|
7
|
+
query: '/webmeterapi/commonQuery',
|
|
8
|
+
// 通用新增/修改
|
|
9
|
+
addOrModify: '/webmeterapi/commonAddOrModify',
|
|
10
|
+
// 通用删除
|
|
11
|
+
delete: '/webmeterapi/commonDelete',
|
|
12
|
+
// 获取字典键列表
|
|
13
|
+
getDictionaryParam: '/webmeterapi/getDictionaryParam'
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* 通用表单查询
|
|
18
|
+
*/
|
|
19
|
+
export function query (parameter) {
|
|
20
|
+
return request(commonApi.query, METHOD.POST, parameter)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* 通用新增/修改
|
|
25
|
+
*/
|
|
26
|
+
export function addOrModify (parameter) {
|
|
27
|
+
return request(commonApi.addOrModify, METHOD.POST, parameter)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* 通用删除
|
|
32
|
+
*/
|
|
33
|
+
export function remove (parameter) {
|
|
34
|
+
return request(commonApi.delete, METHOD.POST, parameter)
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export { commonApi }
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { METHOD, request } from '
|
|
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
|
-
* @returns {Promise<AxiosResponse<T>>}
|
|
18
|
-
*/
|
|
19
|
-
function post (url, parameter) {
|
|
20
|
-
return request(url, METHOD.POST, parameter)
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
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
|
+
* @returns {Promise<AxiosResponse<T>>}
|
|
18
|
+
*/
|
|
19
|
+
function post (url, parameter) {
|
|
20
|
+
return request(url, METHOD.POST, parameter)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export { get, post }
|
package/src/services/user.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { LOGIN, ROUTES } from '
|
|
2
|
-
import { request, METHOD, removeAuthorization } from '
|
|
1
|
+
import { LOGIN, ROUTES } from '@vue2-client/services/api'
|
|
2
|
+
import { request, METHOD, removeAuthorization } from '@vue2-client/utils/request'
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* 登录服务
|
package/src/store/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import modules from './modules'
|
|
2
|
-
|
|
3
|
-
export {
|
|
4
|
-
modules
|
|
5
|
-
}
|
|
1
|
+
import modules from './modules'
|
|
2
|
+
|
|
3
|
+
export {
|
|
4
|
+
modules
|
|
5
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import config from '
|
|
2
|
-
import { ADMIN } from '
|
|
3
|
-
import { formatFullPath } from '
|
|
4
|
-
import { filterMenu } from '
|
|
5
|
-
import { getLocalSetting } from '
|
|
1
|
+
import config from '@vue2-client/config'
|
|
2
|
+
import { ADMIN } from '@vue2-client/config/default'
|
|
3
|
+
import { formatFullPath } from '@vue2-client/utils/i18n'
|
|
4
|
+
import { filterMenu } from '@vue2-client/utils/authority-utils'
|
|
5
|
+
import { getLocalSetting } from '@vue2-client/utils/themeUtil'
|
|
6
6
|
import deepClone from 'lodash.clonedeep'
|
|
7
7
|
|
|
8
8
|
const localSetting = getLocalSetting(true)
|
package/src/theme/index.less
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
@import '~ant-design-vue/dist/antd.less';
|
|
2
|
-
@import "default/index";
|
|
3
|
-
@import "antd/index";
|
|
4
|
-
@import "global.less";
|
|
5
|
-
@import "reportTable.less";
|
|
1
|
+
@import '~ant-design-vue/dist/antd.less';
|
|
2
|
+
@import "default/index";
|
|
3
|
+
@import "antd/index";
|
|
4
|
+
@import "global.less";
|
|
5
|
+
@import "reportTable.less";
|