vue2-client 1.3.14 → 1.3.15

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.
Files changed (95) hide show
  1. package/CHANGELOG.md +315 -311
  2. package/index.js +30 -30
  3. package/package.json +76 -76
  4. package/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox.vue +225 -225
  5. package/src/base-client/components/common/CreateQuery/CreateQuery.vue +551 -551
  6. package/src/base-client/components/common/CreateQuery/CreateQueryItem.vue +777 -777
  7. package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQueryItem.vue +553 -553
  8. package/src/base-client/components/common/CustomColumnsDrawer/index.md +46 -46
  9. package/src/base-client/components/common/FormGroupQuery/FormGroupQuery.vue +165 -165
  10. package/src/base-client/components/common/JSONToTree/jsontotree.vue +275 -275
  11. package/src/base-client/components/common/Upload/Upload.vue +165 -161
  12. package/src/base-client/components/common/XAddForm/XAddForm.vue +353 -353
  13. package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +326 -326
  14. package/src/base-client/components/common/XCard/XCard.vue +64 -64
  15. package/src/base-client/components/common/XForm/XForm.vue +273 -273
  16. package/src/base-client/components/common/XForm/XFormItem.vue +389 -389
  17. package/src/base-client/components/common/XFormTable/index.md +96 -96
  18. package/src/base-client/components/common/XTable/XTable.vue +278 -278
  19. package/src/base-client/components/system/LogDetailsView/LogDetailsView.vue +376 -376
  20. package/src/base-client/components/system/QueryParamsDetailsView/QueryParamsDetailsView.vue +281 -281
  21. package/src/base-client/components/ticket/TicketDetailsView/TicketDetailsView.vue +807 -807
  22. package/src/base-client/components/ticket/TicketDetailsView/index.md +29 -29
  23. package/src/base-client/components/ticket/TicketDetailsView/part/TicketDetailsFlow.vue +260 -260
  24. package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +532 -532
  25. package/src/base-client/components/ticket/TicketSubmitSuccessView/index.md +29 -29
  26. package/src/base-client/plugins/AppData.js +69 -69
  27. package/src/base-client/plugins/GetLoginInfoService.js +179 -179
  28. package/src/base-client/plugins/PagedList.js +177 -177
  29. package/src/base-client/plugins/compatible/LoginServiceOA.js +20 -20
  30. package/src/base-client/plugins/i18n-extend.js +32 -32
  31. package/src/components/Ellipsis/index.md +38 -38
  32. package/src/components/NumberInfo/index.md +43 -43
  33. package/src/components/STable/README.md +341 -341
  34. package/src/components/STable/index.js +318 -318
  35. package/src/components/Trend/index.md +45 -45
  36. package/src/components/checkbox/ColorCheckbox.vue +157 -157
  37. package/src/components/checkbox/ImgCheckbox.vue +163 -163
  38. package/src/components/exception/ExceptionPage.vue +70 -70
  39. package/src/components/form/FormRow.vue +52 -52
  40. package/src/components/index.js +36 -36
  41. package/src/components/menu/SideMenu.vue +62 -62
  42. package/src/components/menu/menu.js +273 -273
  43. package/src/components/setting/Setting.vue +235 -235
  44. package/src/components/table/StandardTable.vue +141 -141
  45. package/src/components/table/advance/ActionColumns.vue +158 -158
  46. package/src/components/table/advance/SearchArea.vue +355 -355
  47. package/src/components/tool/AStepItem.vue +60 -60
  48. package/src/components/tool/AvatarList.vue +68 -68
  49. package/src/components/tool/Drawer.vue +142 -142
  50. package/src/components/tool/TagSelect.vue +83 -83
  51. package/src/components/transition/PageToggleTransition.vue +97 -97
  52. package/src/config/replacer/resolve.config.js +67 -67
  53. package/src/layouts/AdminLayout.vue +174 -174
  54. package/src/layouts/header/AdminHeader.vue +104 -104
  55. package/src/layouts/header/HeaderNotice.vue +167 -167
  56. package/src/layouts/header/HeaderSearch.vue +67 -67
  57. package/src/layouts/header/InstitutionDetail.vue +181 -181
  58. package/src/layouts/tabs/TabsHead.vue +190 -190
  59. package/src/layouts/tabs/TabsView.vue +379 -379
  60. package/src/mock/goods/index.js +108 -108
  61. package/src/pages/CreateQueryPage.vue +65 -65
  62. package/src/pages/login/Login.vue +277 -277
  63. package/src/pages/report/ReportTable.js +124 -124
  64. package/src/pages/report/ReportTableHome.vue +28 -28
  65. package/src/pages/resourceManage/orgListManage.vue +98 -98
  66. package/src/pages/system/dictionary/index.vue +43 -43
  67. package/src/pages/system/file/index.vue +317 -317
  68. package/src/pages/system/queryParams/index.vue +43 -43
  69. package/src/pages/system/ticket/index.vue +461 -461
  70. package/src/pages/system/ticket/submitTicketSuccess.vue +206 -206
  71. package/src/router/async/config.async.js +27 -27
  72. package/src/router/async/router.map.js +56 -56
  73. package/src/router/index.js +27 -27
  74. package/src/services/api/DictionaryDetailsViewApi.js +6 -6
  75. package/src/services/api/LogDetailsViewApi.js +10 -10
  76. package/src/services/api/QueryParamsDetailsViewApi.js +6 -6
  77. package/src/services/api/TicketDetailsViewApi.js +34 -34
  78. package/src/services/api/common.js +58 -58
  79. package/src/services/api/commonTempTable.js +10 -10
  80. package/src/services/api/index.js +17 -17
  81. package/src/services/api/manage.js +8 -8
  82. package/src/store/mutation-types.js +2 -2
  83. package/src/theme/default/nprogress.less +76 -76
  84. package/src/theme/default/style.less +47 -47
  85. package/src/utils/colors.js +103 -103
  86. package/src/utils/excel/Blob.js +180 -180
  87. package/src/utils/excel/Export2Excel.js +141 -141
  88. package/src/utils/formatter.js +68 -68
  89. package/src/utils/i18n.js +80 -80
  90. package/src/utils/request.js +225 -225
  91. package/src/utils/routerUtil.js +358 -358
  92. package/src/utils/theme-color-replacer-extend.js +91 -91
  93. package/src/utils/themeUtil.js +100 -100
  94. package/src/utils/util.js +230 -230
  95. package/vue.config.js +99 -99
@@ -1,206 +1,206 @@
1
- <template>
2
- <a-card :bordered="false" class="result-success">
3
- <result :description="description" :is-success="icon" :title="title">
4
- <template slot="action">
5
- <span v-if="countDown > 0" style="margin-right: 10px">{{ countDown }}</span>
6
- <!-- <a-button type="primary" v-if="UrgentAvailable" :disabled="urgentAccess" style="margin-right: 20px" @click="urgent">请求加急处理</a-button> -->
7
- <!-- <a-button type="danger" @click="closeBtn">撤销工单</a-button> -->
8
- </template>
9
- <a-modal
10
- :visible="closeVisible"
11
- :zIndex="1002"
12
- title="关闭工单"
13
- @cancel="handleCloseCancel"
14
- @ok="handleCloseOk"
15
- >
16
- <p>是否确认手动关闭工单?</p>
17
- <p style="color: red">(该操作不可撤销,请谨慎操作!)</p>
18
- </a-modal>
19
- <div>
20
- <div class="project-name">工单处理进度</div>
21
- <detail-list size="small" style="max-width: 800px; margin-bottom: 8px">
22
- <detail-list-item term="工单编号">{{ serialNumber }}</detail-list-item>
23
- <detail-list-item v-if="details.name" term="负责人">{{ details.name }}</detail-list-item>
24
- <detail-list-item term="提交时间">{{ details.createdTime }}</detail-list-item>
25
- </detail-list>
26
- <a-steps :current="step" progressDot>
27
- <a-step title="工单提交">
28
- <a-step-item-group slot="description">
29
- <a-step-item :title="details.uploader" />
30
- <a-step-item :title="details.createdTime"/>
31
- </a-step-item-group>
32
- </a-step>
33
- <a-step title="工单处理中" >
34
- <a-step-item-group slot="description">
35
- <a-step-item v-if="step >= 1" :title="details.name" />
36
- <a-step-item v-if="step >= 1" :title="details.confirmTime"/>
37
- </a-step-item-group>
38
- </a-step>
39
- <a-step title="工单完成" >
40
- <a-step-item-group slot="description">
41
- <a-step-item v-if="step >= 2" :title="details.finishedTime"/>
42
- </a-step-item-group>
43
- </a-step>
44
- </a-steps>
45
- </div>
46
- </result>
47
- </a-card>
48
- </template>
49
-
50
- <script>
51
- import Result from '@vue2-client/components/result/Result'
52
- import DetailList from '@vue2-client/components/tool/DetailList'
53
- import AStepItem from '@vue2-client/components/tool/AStepItem'
54
- import { TicketDetailsViewApi, post } from '@vue2-client/services/api'
55
- import { formatDate } from '@vue2-client/utils/util'
56
-
57
- const AStepItemGroup = AStepItem.Group
58
- const DetailListItem = DetailList.Item
59
-
60
- export default {
61
- name: 'submitTicketSuccess',
62
- components: { AStepItemGroup, AStepItem, DetailListItem, DetailList, Result },
63
- props: {
64
- // 工单序列号
65
- serialNumber: {
66
- type: String,
67
- required: true
68
- }
69
- },
70
- data () {
71
- return {
72
- title: '提交成功',
73
- description: '您创建的工单已成功提交,请保持电话畅通,我们的工作人员将尽快与您取得联系。', // +
74
- // '如果需要加急,请在倒计时结束后点击加急按钮,加急后我们将优先处理您的工单',
75
- // 工单详情
76
- details: {
77
- uploader: '',
78
- status: '',
79
- name: '',
80
- createdTime: '',
81
- confirmTime: '',
82
- finishedTime: ''
83
- },
84
- // 控制加急按钮
85
- urgentAccess: true,
86
- // 倒计时
87
- countDown: 0,
88
- // 控制加急按钮显示
89
- UrgentAvailable: true,
90
- // 取消工单确认框可见性
91
- closeVisible: false,
92
- // 控制页面大图标
93
- icon: true
94
- }
95
- },
96
- mounted () {
97
- this.getTicketDetail()
98
- },
99
- methods: {
100
- format (date, format) {
101
- return formatDate(date, format)
102
- },
103
- // 关闭工单确认后操作
104
- handleCloseOk () {
105
- return post(TicketDetailsViewApi.manualCloseTicketByCustomer, {
106
- serialNumber: this.serialNumber,
107
- time: new Date()
108
- })
109
- .then(res => {
110
- this.closeVisible = false
111
- this.title = '工单已关闭'
112
- this.description = ''
113
- this.icon = false
114
- }, err => {
115
- console.error(err)
116
- })
117
- },
118
- // 关闭工单取消后业务逻辑
119
- handleCloseCancel () {
120
- this.closeVisible = false
121
- },
122
- // 关闭工单按钮
123
- closeBtn () {
124
- this.closeVisible = true
125
- },
126
- // 对工单进行加急处理
127
- urgent () {
128
- return post(TicketDetailsViewApi.rushTicket, {
129
- serialNumber: this.serialNumber
130
- })
131
- .then(res => {
132
- if (res.data === 1) {
133
- this.$message.success(
134
- '操作成功',
135
- 5
136
- )
137
- this.description = '您的工单已经被加急处理,我们的工作人员会优先处理您的请求。'
138
- this.UrgentAvailable = false
139
- } else {
140
- this.$message.error(
141
- '操作失败',
142
- 5
143
- )
144
- }
145
- }, err => {
146
- console.log(err)
147
- })
148
- },
149
- // 获取工单详情
150
- getTicketDetail () {
151
- return post(TicketDetailsViewApi.getTicketDetailsForUploader, {
152
- serialNumber: this.serialNumber
153
- })
154
- .then(res => {
155
- this.details.uploader = res.uploader
156
- // 判断负责人有没有值
157
- if (res.name === undefined) {
158
- this.details.name = ''
159
- } else {
160
- this.details.name = res.name
161
- }
162
- // 判断工单被确认时间
163
- if (res.confirmtime === undefined) {
164
- this.details.confirmTime = ''
165
- } else {
166
- this.details.confirmTime = this.format(res.confirmtime, 'yyyy-MM-dd hh:mm:ss')
167
- }
168
- // 判断工单完成时间
169
- if (res.finishedtime === undefined) {
170
- this.details.finishedTime = ''
171
- } else {
172
- this.details.finishedTime = this.format(res.finishedtime, 'yyyy-MM-dd hh:mm:ss')
173
- }
174
- this.details.createdTime = this.format(res.createdtime, 'yyyy-MM-dd hh:mm:ss')
175
- this.details.status = res.status
176
- }, err => {
177
- console.log(err)
178
- })
179
- },
180
- },
181
- computed: {
182
- // 用于进度条,进度显示控制
183
- step () {
184
- if (this.details.status !== 0 && this.details.status !== 1) {
185
- return 2
186
- } else {
187
- return this.details.status
188
- }
189
- }
190
- }
191
- }
192
- </script>
193
-
194
- <style lang="less" scoped>
195
- .result-success{
196
- .action:not(:first-child){
197
- margin-left: 8px;
198
- }
199
- .project-name{
200
- font-size: 16px;
201
- color: @title-color;
202
- font-weight: 500;
203
- margin-bottom: 20px;
204
- }
205
- }
206
- </style>
1
+ <template>
2
+ <a-card :bordered="false" class="result-success">
3
+ <result :description="description" :is-success="icon" :title="title">
4
+ <template slot="action">
5
+ <span v-if="countDown > 0" style="margin-right: 10px">{{ countDown }}</span>
6
+ <!-- <a-button type="primary" v-if="UrgentAvailable" :disabled="urgentAccess" style="margin-right: 20px" @click="urgent">请求加急处理</a-button> -->
7
+ <!-- <a-button type="danger" @click="closeBtn">撤销工单</a-button> -->
8
+ </template>
9
+ <a-modal
10
+ :visible="closeVisible"
11
+ :zIndex="1002"
12
+ title="关闭工单"
13
+ @cancel="handleCloseCancel"
14
+ @ok="handleCloseOk"
15
+ >
16
+ <p>是否确认手动关闭工单?</p>
17
+ <p style="color: red">(该操作不可撤销,请谨慎操作!)</p>
18
+ </a-modal>
19
+ <div>
20
+ <div class="project-name">工单处理进度</div>
21
+ <detail-list size="small" style="max-width: 800px; margin-bottom: 8px">
22
+ <detail-list-item term="工单编号">{{ serialNumber }}</detail-list-item>
23
+ <detail-list-item v-if="details.name" term="负责人">{{ details.name }}</detail-list-item>
24
+ <detail-list-item term="提交时间">{{ details.createdTime }}</detail-list-item>
25
+ </detail-list>
26
+ <a-steps :current="step" progressDot>
27
+ <a-step title="工单提交">
28
+ <a-step-item-group slot="description">
29
+ <a-step-item :title="details.uploader" />
30
+ <a-step-item :title="details.createdTime"/>
31
+ </a-step-item-group>
32
+ </a-step>
33
+ <a-step title="工单处理中" >
34
+ <a-step-item-group slot="description">
35
+ <a-step-item v-if="step >= 1" :title="details.name" />
36
+ <a-step-item v-if="step >= 1" :title="details.confirmTime"/>
37
+ </a-step-item-group>
38
+ </a-step>
39
+ <a-step title="工单完成" >
40
+ <a-step-item-group slot="description">
41
+ <a-step-item v-if="step >= 2" :title="details.finishedTime"/>
42
+ </a-step-item-group>
43
+ </a-step>
44
+ </a-steps>
45
+ </div>
46
+ </result>
47
+ </a-card>
48
+ </template>
49
+
50
+ <script>
51
+ import Result from '@vue2-client/components/result/Result'
52
+ import DetailList from '@vue2-client/components/tool/DetailList'
53
+ import AStepItem from '@vue2-client/components/tool/AStepItem'
54
+ import { TicketDetailsViewApi, post } from '@vue2-client/services/api'
55
+ import { formatDate } from '@vue2-client/utils/util'
56
+
57
+ const AStepItemGroup = AStepItem.Group
58
+ const DetailListItem = DetailList.Item
59
+
60
+ export default {
61
+ name: 'submitTicketSuccess',
62
+ components: { AStepItemGroup, AStepItem, DetailListItem, DetailList, Result },
63
+ props: {
64
+ // 工单序列号
65
+ serialNumber: {
66
+ type: String,
67
+ required: true
68
+ }
69
+ },
70
+ data () {
71
+ return {
72
+ title: '提交成功',
73
+ description: '您创建的工单已成功提交,请保持电话畅通,我们的工作人员将尽快与您取得联系。', // +
74
+ // '如果需要加急,请在倒计时结束后点击加急按钮,加急后我们将优先处理您的工单',
75
+ // 工单详情
76
+ details: {
77
+ uploader: '',
78
+ status: '',
79
+ name: '',
80
+ createdTime: '',
81
+ confirmTime: '',
82
+ finishedTime: ''
83
+ },
84
+ // 控制加急按钮
85
+ urgentAccess: true,
86
+ // 倒计时
87
+ countDown: 0,
88
+ // 控制加急按钮显示
89
+ UrgentAvailable: true,
90
+ // 取消工单确认框可见性
91
+ closeVisible: false,
92
+ // 控制页面大图标
93
+ icon: true
94
+ }
95
+ },
96
+ mounted () {
97
+ this.getTicketDetail()
98
+ },
99
+ methods: {
100
+ format (date, format) {
101
+ return formatDate(date, format)
102
+ },
103
+ // 关闭工单确认后操作
104
+ handleCloseOk () {
105
+ return post(TicketDetailsViewApi.manualCloseTicketByCustomer, {
106
+ serialNumber: this.serialNumber,
107
+ time: new Date()
108
+ })
109
+ .then(res => {
110
+ this.closeVisible = false
111
+ this.title = '工单已关闭'
112
+ this.description = ''
113
+ this.icon = false
114
+ }, err => {
115
+ console.error(err)
116
+ })
117
+ },
118
+ // 关闭工单取消后业务逻辑
119
+ handleCloseCancel () {
120
+ this.closeVisible = false
121
+ },
122
+ // 关闭工单按钮
123
+ closeBtn () {
124
+ this.closeVisible = true
125
+ },
126
+ // 对工单进行加急处理
127
+ urgent () {
128
+ return post(TicketDetailsViewApi.rushTicket, {
129
+ serialNumber: this.serialNumber
130
+ })
131
+ .then(res => {
132
+ if (res.data === 1) {
133
+ this.$message.success(
134
+ '操作成功',
135
+ 5
136
+ )
137
+ this.description = '您的工单已经被加急处理,我们的工作人员会优先处理您的请求。'
138
+ this.UrgentAvailable = false
139
+ } else {
140
+ this.$message.error(
141
+ '操作失败',
142
+ 5
143
+ )
144
+ }
145
+ }, err => {
146
+ console.log(err)
147
+ })
148
+ },
149
+ // 获取工单详情
150
+ getTicketDetail () {
151
+ return post(TicketDetailsViewApi.getTicketDetailsForUploader, {
152
+ serialNumber: this.serialNumber
153
+ })
154
+ .then(res => {
155
+ this.details.uploader = res.uploader
156
+ // 判断负责人有没有值
157
+ if (res.name === undefined) {
158
+ this.details.name = ''
159
+ } else {
160
+ this.details.name = res.name
161
+ }
162
+ // 判断工单被确认时间
163
+ if (res.confirmtime === undefined) {
164
+ this.details.confirmTime = ''
165
+ } else {
166
+ this.details.confirmTime = this.format(res.confirmtime, 'yyyy-MM-dd hh:mm:ss')
167
+ }
168
+ // 判断工单完成时间
169
+ if (res.finishedtime === undefined) {
170
+ this.details.finishedTime = ''
171
+ } else {
172
+ this.details.finishedTime = this.format(res.finishedtime, 'yyyy-MM-dd hh:mm:ss')
173
+ }
174
+ this.details.createdTime = this.format(res.createdtime, 'yyyy-MM-dd hh:mm:ss')
175
+ this.details.status = res.status
176
+ }, err => {
177
+ console.log(err)
178
+ })
179
+ },
180
+ },
181
+ computed: {
182
+ // 用于进度条,进度显示控制
183
+ step () {
184
+ if (this.details.status !== 0 && this.details.status !== 1) {
185
+ return 2
186
+ } else {
187
+ return this.details.status
188
+ }
189
+ }
190
+ }
191
+ }
192
+ </script>
193
+
194
+ <style lang="less" scoped>
195
+ .result-success{
196
+ .action:not(:first-child){
197
+ margin-left: 8px;
198
+ }
199
+ .project-name{
200
+ font-size: 16px;
201
+ color: @title-color;
202
+ font-weight: 500;
203
+ margin-bottom: 20px;
204
+ }
205
+ }
206
+ </style>
@@ -1,27 +1,27 @@
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
- config: routesConfig
25
- }
26
-
27
- 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
+ config: routesConfig
25
+ }
26
+
27
+ export default options
@@ -1,56 +1,56 @@
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.fileManager = () => import('@vue2-client/pages/system/file')
22
- // 系统问题反馈工单
23
- routerResource.submitTicket = () => import(/* webpackChunkName: "submitTicket" */ '@vue2-client/pages/system/ticket')
24
-
25
- // 基础路由组件注册
26
- const routerMap = {
27
- login: {
28
- authority: '*',
29
- path: '/login',
30
- component: () => import('@vue2-client/pages/login')
31
- },
32
- root: {
33
- path: '/',
34
- name: '首页',
35
- redirect: '/login',
36
- component: view.tabs
37
- },
38
- exp403: {
39
- authority: '*',
40
- name: 'exp403',
41
- path: '403',
42
- component: () => import('@vue2-client/pages/exception/403')
43
- },
44
- exp404: {
45
- name: 'exp404',
46
- path: '404',
47
- component: () => import('@vue2-client/pages/exception/404')
48
- },
49
- exp500: {
50
- name: 'exp500',
51
- path: '500',
52
- component: () => import('@vue2-client/pages/exception/500')
53
- }
54
- }
55
- Object.assign(routerMap, routerResource)
56
- 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.fileManager = () => import('@vue2-client/pages/system/file')
22
+ // 系统问题反馈工单
23
+ routerResource.submitTicket = () => import(/* webpackChunkName: "submitTicket" */ '@vue2-client/pages/system/ticket')
24
+
25
+ // 基础路由组件注册
26
+ const routerMap = {
27
+ login: {
28
+ authority: '*',
29
+ path: '/login',
30
+ component: () => import('@vue2-client/pages/login')
31
+ },
32
+ root: {
33
+ path: '/',
34
+ name: '首页',
35
+ redirect: '/login',
36
+ component: view.tabs
37
+ },
38
+ exp403: {
39
+ authority: '*',
40
+ name: 'exp403',
41
+ path: '403',
42
+ component: () => import('@vue2-client/pages/exception/403')
43
+ },
44
+ exp404: {
45
+ name: 'exp404',
46
+ path: '404',
47
+ component: () => import('@vue2-client/pages/exception/404')
48
+ },
49
+ exp500: {
50
+ name: 'exp500',
51
+ path: '500',
52
+ component: () => import('@vue2-client/pages/exception/500')
53
+ }
54
+ }
55
+ Object.assign(routerMap, routerResource)
56
+ export default routerMap
@@ -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,6 +1,6 @@
1
- const DictionaryDetailsViewApi = {
2
- // 查询:获取字典详情
3
- getDictionaryDetails: '/api/af-system/logic/getDictionaryDetails'
4
- }
5
-
6
- export { DictionaryDetailsViewApi }
1
+ const DictionaryDetailsViewApi = {
2
+ // 查询:获取字典详情
3
+ getDictionaryDetails: '/api/af-system/logic/getDictionaryDetails'
4
+ }
5
+
6
+ export { DictionaryDetailsViewApi }