vue2-client 1.2.6 → 1.2.9
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 +24 -0
- package/package.json +89 -89
- package/src/base-client/components/common/CreateQuery/CreateQuery.vue +39 -14
- package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQuery.vue +225 -26
- package/src/base-client/components/common/XForm/XFormItem.vue +51 -5
- package/src/base-client/components/iot/InstructDetailsView/InstructDetailsView.vue +2 -3
- package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +2 -2
- package/src/config/CreateQueryConfig.js +40 -0
- package/src/config/default/setting.config.js +1 -0
- package/src/pages/login/Login.vue +8 -4
- package/src/pages/system/ticket/index.vue +427 -0
- package/src/pages/system/ticket/submitTicketSuccess.vue +249 -0
- package/src/router/async/config.async.js +1 -0
- package/src/router/async/router.map.js +59 -57
- package/src/services/api/EmployeeDetailsViewApi.js +0 -4
- package/src/utils/util.js +34 -4
- package/vue.config.js +0 -10
|
@@ -1,57 +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.
|
|
23
|
-
//
|
|
24
|
-
routerResource.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
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
|
|
@@ -7,10 +7,6 @@ const EmployeeDetailsViewApi = {
|
|
|
7
7
|
getFinishedTicketsCountWeekly: '/webmeterapi/getFinishedTicketsCountWeekly',
|
|
8
8
|
// 查询:是否存在此员工
|
|
9
9
|
findEmpName: '/webmeterapi/findEmpName',
|
|
10
|
-
// 查询:获取部门名字典
|
|
11
|
-
getDepartmentDictionary: '/webmeterapi/getDepartmentDictionary',
|
|
12
|
-
// 查询:获取模块名字典
|
|
13
|
-
getModelDictionary: '/webmeterapi/getModelDictionary',
|
|
14
10
|
// 查询:获取所有员工名,供前端展示备选项
|
|
15
11
|
getAllEmployeeName: '/webmeterapi/getAllEmployeeName'
|
|
16
12
|
}
|
package/src/utils/util.js
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
import enquireJs from 'enquire.js'
|
|
2
2
|
|
|
3
|
+
const timeList = [
|
|
4
|
+
{
|
|
5
|
+
CN: '早上好',
|
|
6
|
+
HK: '早晨啊',
|
|
7
|
+
US: 'Good morning'
|
|
8
|
+
}, {
|
|
9
|
+
CN: '上午好',
|
|
10
|
+
HK: '上午好',
|
|
11
|
+
US: 'Good morning'
|
|
12
|
+
}, {
|
|
13
|
+
CN: '中午好',
|
|
14
|
+
HK: '中午好',
|
|
15
|
+
US: 'Good afternoon'
|
|
16
|
+
}, {
|
|
17
|
+
CN: '下午好',
|
|
18
|
+
HK: '下午好',
|
|
19
|
+
US: 'Good afternoon'
|
|
20
|
+
}, {
|
|
21
|
+
CN: '晚上好',
|
|
22
|
+
HK: '晚上好',
|
|
23
|
+
US: 'Good evening'
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
|
|
3
27
|
export function isDef (v) {
|
|
4
28
|
return v !== undefined && v !== null
|
|
5
29
|
}
|
|
@@ -43,6 +67,13 @@ export function timeCompare (date1, date2) {
|
|
|
43
67
|
return date11.time > date22.time ? 1 : -1
|
|
44
68
|
}
|
|
45
69
|
|
|
70
|
+
export function timeFix () {
|
|
71
|
+
const time = new Date()
|
|
72
|
+
const hour = time.getHours()
|
|
73
|
+
return hour < 9
|
|
74
|
+
? timeList[0] : (hour <= 11 ? timeList[1] : (hour <= 13 ? timeList[2] : (hour <= 20 ? timeList[3] : timeList[4])))
|
|
75
|
+
}
|
|
76
|
+
|
|
46
77
|
/**
|
|
47
78
|
* Remove an item from an array.
|
|
48
79
|
*/
|
|
@@ -81,16 +112,15 @@ export function showXml (str) {
|
|
|
81
112
|
|
|
82
113
|
// 把注释编码
|
|
83
114
|
text = text.replace(/\n/g, '\r').replace(/<!--(.+?)-->/g, function ($0, text) {
|
|
84
|
-
|
|
85
|
-
return ret
|
|
115
|
+
return '<!--' + escape(text) + '-->'
|
|
86
116
|
}).replace(/\r/g, '\n')
|
|
87
117
|
|
|
88
118
|
// 调整格式
|
|
89
|
-
const rgx = /\n(<(([^?]).+?)(?:\s|\s*?>|\s*?(\/)>)(?:.*?(?:(
|
|
119
|
+
const rgx = /\n(<(([^?]).+?)(?:\s|\s*?>|\s*?(\/)>)(?:.*?(?:(\/)>|<(\/)\2>))?)/mg
|
|
90
120
|
const nodeStack = []
|
|
91
121
|
const output = text.replace(rgx, function ($0, all, name, isBegin, isCloseFull1, isCloseFull2, isFull1, isFull2) {
|
|
92
122
|
const isClosed = (isCloseFull1 === '/') || (isCloseFull2 === '/') || (isFull1 === '/') || (isFull2 === '/')
|
|
93
|
-
let prefix
|
|
123
|
+
let prefix
|
|
94
124
|
if (isBegin === '!') {
|
|
95
125
|
prefix = getPrefix(nodeStack.length)
|
|
96
126
|
} else {
|
package/vue.config.js
CHANGED
|
@@ -59,11 +59,6 @@ module.exports = {
|
|
|
59
59
|
ws: false,
|
|
60
60
|
changeOrigin: true
|
|
61
61
|
},
|
|
62
|
-
'iot/webmeterapi': {
|
|
63
|
-
pathRewrite: { '^/iot/webmeterapi': '/rs/logic' },
|
|
64
|
-
target: local,
|
|
65
|
-
changeOrigin: true
|
|
66
|
-
},
|
|
67
62
|
'/webmeterapi': {
|
|
68
63
|
pathRewrite: { '^/webmeterapi': '/rs/logic' },
|
|
69
64
|
target: local,
|
|
@@ -73,11 +68,6 @@ module.exports = {
|
|
|
73
68
|
pathRewrite: { '^/webmeteruploadapi': '/rs/file' },
|
|
74
69
|
target: local,
|
|
75
70
|
changeOrigin: true
|
|
76
|
-
},
|
|
77
|
-
'/webmetersql': {
|
|
78
|
-
pathRewrite: { '^/webmetersql': '/rs/sql' },
|
|
79
|
-
target: local,
|
|
80
|
-
changeOrigin: true
|
|
81
71
|
}
|
|
82
72
|
}
|
|
83
73
|
},
|