vue2-client 1.2.32 → 1.2.35
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 +1 -0
- package/CHANGELOG.md +15 -0
- package/package.json +1 -1
- package/src/base-client/all.js +2 -0
- package/src/base-client/components/common/CreateQuery/CreateQuery.vue +46 -19
- package/src/base-client/components/common/Upload/Upload.vue +124 -0
- package/src/base-client/components/common/Upload/index.js +3 -0
- package/src/base-client/components/common/XAddForm/XAddForm.vue +1 -0
- package/src/base-client/components/common/XAddNativeForm/index.js +3 -3
- package/src/base-client/components/common/XAddNativeForm/index.md +56 -56
- package/src/base-client/components/common/XForm/XFormItem.vue +6 -33
- package/src/base-client/components/common/XFormTable/XFormTable.vue +484 -484
- package/src/base-client/components/common/XFormTable/index.md +5 -0
- package/src/base-client/components/common/XTable/index.md +255 -255
- 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/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +532 -528
- package/src/config/default/setting.config.js +34 -34
- package/src/pages/login/Login.vue +198 -198
- package/src/pages/system/ticket/index.vue +440 -437
- package/src/router/async/config.async.js +26 -26
- package/src/router/async/router.map.js +59 -59
- package/src/router/index.js +27 -27
- package/src/services/api/EmployeeDetailsViewApi.js +16 -16
- package/src/services/api/applyInstallApi.js +14 -14
- package/src/services/api/restTools.js +3 -2
- package/src/utils/request.js +198 -197
- package/vue.config.js +143 -143
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import routerMap from './router.map'
|
|
2
|
-
import { parseRoutes } from '@vue2-client/utils/routerUtil'
|
|
3
|
-
|
|
4
|
-
// 异步路由配置
|
|
5
|
-
const routesConfig = [
|
|
6
|
-
'login',
|
|
7
|
-
'submitTicket',
|
|
8
|
-
'root',
|
|
9
|
-
{
|
|
10
|
-
router: 'exp404',
|
|
11
|
-
path: '*',
|
|
12
|
-
name: '404'
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
router: 'exp403',
|
|
16
|
-
path: '/403',
|
|
17
|
-
name: '403'
|
|
18
|
-
}
|
|
19
|
-
]
|
|
20
|
-
|
|
21
|
-
const options = {
|
|
22
|
-
mode: 'history',
|
|
23
|
-
routes: parseRoutes(routesConfig, routerMap)
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export default options
|
|
1
|
+
import routerMap from './router.map'
|
|
2
|
+
import { parseRoutes } from '@vue2-client/utils/routerUtil'
|
|
3
|
+
|
|
4
|
+
// 异步路由配置
|
|
5
|
+
const routesConfig = [
|
|
6
|
+
'login',
|
|
7
|
+
'submitTicket',
|
|
8
|
+
'root',
|
|
9
|
+
{
|
|
10
|
+
router: 'exp404',
|
|
11
|
+
path: '*',
|
|
12
|
+
name: '404'
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
router: 'exp403',
|
|
16
|
+
path: '/403',
|
|
17
|
+
name: '403'
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
const options = {
|
|
22
|
+
mode: 'history',
|
|
23
|
+
routes: parseRoutes(routesConfig, routerMap)
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export default options
|
|
@@ -1,59 +1,59 @@
|
|
|
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.submitTicket = () => import(/* webpackChunkName: "submitTicket" */ '@vue2-client/pages/system/ticket')
|
|
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
|
|
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.submitTicket = () => import(/* webpackChunkName: "submitTicket" */ '@vue2-client/pages/system/ticket')
|
|
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/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'], // 根据路由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,16 +1,16 @@
|
|
|
1
|
-
const EmployeeDetailsViewApi = {
|
|
2
|
-
// 查询:获取员工详细信息
|
|
3
|
-
getEmployeeDetails: '/webmeterapi/getEmployeeDetails',
|
|
4
|
-
// 查询:获取员工上一周应答工单数量
|
|
5
|
-
getConfirmTicketsCountWeekly: '/webmeterapi/getConfirmTicketsCountWeekly',
|
|
6
|
-
// 查询:获取员工上一周完成工单数量
|
|
7
|
-
getFinishedTicketsCountWeekly: '/webmeterapi/getFinishedTicketsCountWeekly',
|
|
8
|
-
// 查询:是否存在此员工
|
|
9
|
-
findEmpName: '/webmeterapi/findEmpName',
|
|
10
|
-
// 查询:获取所有员工名,供前端展示备选项
|
|
11
|
-
getAllEmployeeName: '/webmeterapi/getAllEmployeeName',
|
|
12
|
-
// 查询:根据员工名,获取员工id
|
|
13
|
-
getEmployeeId: '/webmeterapi/getEmployeeId'
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export { EmployeeDetailsViewApi }
|
|
1
|
+
const EmployeeDetailsViewApi = {
|
|
2
|
+
// 查询:获取员工详细信息
|
|
3
|
+
getEmployeeDetails: '/webmeterapi/getEmployeeDetails',
|
|
4
|
+
// 查询:获取员工上一周应答工单数量
|
|
5
|
+
getConfirmTicketsCountWeekly: '/webmeterapi/getConfirmTicketsCountWeekly',
|
|
6
|
+
// 查询:获取员工上一周完成工单数量
|
|
7
|
+
getFinishedTicketsCountWeekly: '/webmeterapi/getFinishedTicketsCountWeekly',
|
|
8
|
+
// 查询:是否存在此员工
|
|
9
|
+
findEmpName: '/webmeterapi/findEmpName',
|
|
10
|
+
// 查询:获取所有员工名,供前端展示备选项
|
|
11
|
+
getAllEmployeeName: '/webmeterapi/getAllEmployeeName',
|
|
12
|
+
// 查询:根据员工名,获取员工id
|
|
13
|
+
getEmployeeId: '/webmeterapi/getEmployeeId'
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { EmployeeDetailsViewApi }
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
const ApplyInstallApi = {
|
|
2
|
-
// 查询:获取报装临时表所需数据
|
|
3
|
-
getApplySubTableData: '/webmeterapi/getApplySubTableData',
|
|
4
|
-
// 初始化子表
|
|
5
|
-
initApplySubTable: '/webmeterapi/initApplySubTable',
|
|
6
|
-
// 删除临时子表
|
|
7
|
-
deleteApplySubTempTable: '/webmeterapi/deleteApplySubTempTable',
|
|
8
|
-
// 创建报建子表的临时表,根据配置文件动态生成
|
|
9
|
-
createTempTable: '/webmeterapi/createTempTable',
|
|
10
|
-
// 向临时表中插入数据
|
|
11
|
-
insertDataToTempTable: '/webmeterapi/insertDataToTempTable'
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export { ApplyInstallApi }
|
|
1
|
+
const ApplyInstallApi = {
|
|
2
|
+
// 查询:获取报装临时表所需数据
|
|
3
|
+
getApplySubTableData: '/webmeterapi/getApplySubTableData',
|
|
4
|
+
// 初始化子表
|
|
5
|
+
initApplySubTable: '/webmeterapi/initApplySubTable',
|
|
6
|
+
// 删除临时子表
|
|
7
|
+
deleteApplySubTempTable: '/webmeterapi/deleteApplySubTempTable',
|
|
8
|
+
// 创建报建子表的临时表,根据配置文件动态生成
|
|
9
|
+
createTempTable: '/webmeterapi/createTempTable',
|
|
10
|
+
// 向临时表中插入数据
|
|
11
|
+
insertDataToTempTable: '/webmeterapi/insertDataToTempTable'
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export { ApplyInstallApi }
|
|
@@ -14,10 +14,11 @@ function get (url, parameter) {
|
|
|
14
14
|
* POST请求
|
|
15
15
|
* @param url 请求地址
|
|
16
16
|
* @param parameter 请求参数
|
|
17
|
+
* @param config
|
|
17
18
|
* @returns {Promise<AxiosResponse<T>>}
|
|
18
19
|
*/
|
|
19
|
-
function post (url, parameter) {
|
|
20
|
-
return request(url, METHOD.POST, parameter)
|
|
20
|
+
function post (url, parameter, config = {}) {
|
|
21
|
+
return request(url, METHOD.POST, parameter, config)
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
export { get, post }
|