vue2-client 1.12.100 → 1.12.102
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/package.json +1 -1
- package/src/base-client/components/common/XCollapse/XCollapse.vue +8 -14
- package/src/base-client/components/common/XCollapse/XCollapseDemo.vue +15 -0
- package/src/base-client/components/common/XReport/index.js +3 -3
- package/src/base-client/components/common/XReportGrid/XReportDemo.vue +44 -44
- package/src/base-client/components/his/XHDescriptions/XHDescriptions.vue +8 -1
- package/src/base-client/components/his/XList/XList.vue +131 -131
- package/src/base-client/components/his/XSidebar/XSidebar.vue +27 -1
- package/src/base-client/plugins/AppData.js +126 -126
- package/src/expression/ExpressionRunner.js +26 -26
- package/src/expression/TestExpression.js +509 -509
- package/src/expression/core/Delegate.js +115 -115
- package/src/expression/core/Expression.js +1358 -1358
- package/src/expression/core/Program.js +932 -932
- package/src/expression/core/Token.js +27 -27
- package/src/expression/enums/ExpressionType.js +81 -81
- package/src/expression/enums/TokenType.js +11 -11
- package/src/expression/exception/BreakWayException.js +2 -2
- package/src/expression/exception/ContinueWayException.js +2 -2
- package/src/expression/exception/ExpressionException.js +28 -28
- package/src/expression/exception/ReturnWayException.js +14 -14
- package/src/expression/exception/ServiceException.js +22 -22
- package/src/expression/instances/LogicConsole.js +44 -44
- package/src/logic/LogicRunner.js +62 -62
- package/src/logic/TestLogic.js +13 -13
- package/src/logic/plugins/common/VueTools.js +30 -30
- package/src/logic/ts/LogicRunner.ts +67 -67
- package/src/logic/ts/TestLogic.ts +13 -13
- package/src/pages/DynamicStatistics/FavoriteList.vue +50 -50
- package/src/pages/ReportGrid/index.vue +76 -76
- package/src/router/async/router.map.js +124 -119
- package/src/services/api/entity.js +18 -18
- package/src/utils/waterMark.js +31 -31
|
@@ -1,126 +1,126 @@
|
|
|
1
|
-
import { manageApi, post } from '@vue2-client/services/api'
|
|
2
|
-
import { handleTree } from '@vue2-client/utils/util'
|
|
3
|
-
import { indexedDB } from '@vue2-client/utils/indexedDB'
|
|
4
|
-
import { getConfigByName } from '@vue2-client/services/api/common'
|
|
5
|
-
|
|
6
|
-
const GetAppDataService = {
|
|
7
|
-
install (Vue) {
|
|
8
|
-
// 给vue增添对话框显示方法
|
|
9
|
-
Vue.$appdata = Vue.prototype.$appdata = GetAppDataService
|
|
10
|
-
},
|
|
11
|
-
async load () {
|
|
12
|
-
const params = {}
|
|
13
|
-
await post(manageApi.getDictionaryValue, {}).then((res) => {
|
|
14
|
-
Object.assign(params, res)
|
|
15
|
-
const badgeItemArray = {}
|
|
16
|
-
for (const key of Object.keys(params)) {
|
|
17
|
-
badgeItemArray[key] = {}
|
|
18
|
-
for (const item of params[key]) {
|
|
19
|
-
let status
|
|
20
|
-
if (!item.status) {
|
|
21
|
-
status = 'none'
|
|
22
|
-
} else {
|
|
23
|
-
status = item.status
|
|
24
|
-
}
|
|
25
|
-
badgeItemArray[key][item.value] = {
|
|
26
|
-
status: status,
|
|
27
|
-
text: item.text
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
// 追加参数
|
|
32
|
-
localStorage.setItem(process.env.VUE_APP_DICTIONARY_KEY, JSON.stringify(params))
|
|
33
|
-
localStorage.setItem(process.env.VUE_APP_BADGE_KEY, JSON.stringify(badgeItemArray))
|
|
34
|
-
})
|
|
35
|
-
},
|
|
36
|
-
// 返回树形省市区
|
|
37
|
-
async getDivisionsOhChinaForTree () {
|
|
38
|
-
// 获取省市区数据
|
|
39
|
-
return new Promise((resolve, reject) => {
|
|
40
|
-
try {
|
|
41
|
-
indexedDB.getByWeb('divisionsOhChina', manageApi.getDivisionsOhChina, {}, res => {
|
|
42
|
-
resolve(res)
|
|
43
|
-
}, processRes => {
|
|
44
|
-
return handleTree(processRes, 'code', 'parentcode')
|
|
45
|
-
})
|
|
46
|
-
} catch (e) {
|
|
47
|
-
reject(e)
|
|
48
|
-
}
|
|
49
|
-
})
|
|
50
|
-
},
|
|
51
|
-
// 旧版获取配置中心字典
|
|
52
|
-
getDictionaryList (key) {
|
|
53
|
-
const str = localStorage.getItem(process.env.VUE_APP_DICTIONARY_KEY)
|
|
54
|
-
const object = JSON.parse(str)
|
|
55
|
-
return object[key]
|
|
56
|
-
},
|
|
57
|
-
async getDictValue (dictKey, value, func, isDev = false, serviceName = process.env.VUE_APP_SYSTEM_NAME) {
|
|
58
|
-
const processResult = (result) => {
|
|
59
|
-
if (!result.value) {
|
|
60
|
-
return {
|
|
61
|
-
status: 'none',
|
|
62
|
-
text: value
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
const item = result.value.find(item => item.value == value)
|
|
66
|
-
if (item) {
|
|
67
|
-
return {
|
|
68
|
-
status: item.status || 'none',
|
|
69
|
-
text: item.label
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
return {
|
|
73
|
-
status: 'none',
|
|
74
|
-
text: value
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
if (func) {
|
|
78
|
-
getConfigByName(dictKey, serviceName, result => {
|
|
79
|
-
func(processResult(result))
|
|
80
|
-
}, isDev)
|
|
81
|
-
} else {
|
|
82
|
-
const result = await new Promise((resolve) => {
|
|
83
|
-
getConfigByName(dictKey, serviceName, resolve, isDev)
|
|
84
|
-
})
|
|
85
|
-
return processResult(result)
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
// 新版获取配置中心字典推荐使用 服务名默认为当前服务
|
|
89
|
-
getDictByKey (dictKey, serviceName = process.env.VUE_APP_SYSTEM_NAME, callback, isDev) {
|
|
90
|
-
getConfigByName(dictKey, undefined, result => {
|
|
91
|
-
callback(result.value)
|
|
92
|
-
}, isDev)
|
|
93
|
-
},
|
|
94
|
-
getParam (key, value, callback) {
|
|
95
|
-
const str = localStorage.getItem(process.env.VUE_APP_BADGE_KEY)
|
|
96
|
-
const object = JSON.parse(str)
|
|
97
|
-
if (object && object[key]) {
|
|
98
|
-
const result = object[key]
|
|
99
|
-
if (Object.prototype.hasOwnProperty.call(result, value)) {
|
|
100
|
-
return result[value]
|
|
101
|
-
} else {
|
|
102
|
-
return { status: 'none', text: value }
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
return null
|
|
106
|
-
},
|
|
107
|
-
getParams () {
|
|
108
|
-
const str = localStorage.getItem(process.env.VUE_APP_DICTIONARY_KEY)
|
|
109
|
-
return JSON.parse(str)
|
|
110
|
-
},
|
|
111
|
-
getSingleValues () {
|
|
112
|
-
const str = localStorage.getItem(process.env.VUE_APP_BADGE_KEY)
|
|
113
|
-
return JSON.parse(str)
|
|
114
|
-
},
|
|
115
|
-
getWebConfigByKey (key) {
|
|
116
|
-
const str = localStorage.getItem(process.env.VUE_APP_WEB_CONFIG_KEY)
|
|
117
|
-
const object = JSON.parse(str)
|
|
118
|
-
return object[key]
|
|
119
|
-
},
|
|
120
|
-
getStylesByKey (key) {
|
|
121
|
-
const str = localStorage.getItem(process.env.VUE_APP_WEB_STYLES_KEY)
|
|
122
|
-
const object = JSON.parse(str)
|
|
123
|
-
return object[key]
|
|
124
|
-
},
|
|
125
|
-
}
|
|
126
|
-
export default GetAppDataService
|
|
1
|
+
import { manageApi, post } from '@vue2-client/services/api'
|
|
2
|
+
import { handleTree } from '@vue2-client/utils/util'
|
|
3
|
+
import { indexedDB } from '@vue2-client/utils/indexedDB'
|
|
4
|
+
import { getConfigByName } from '@vue2-client/services/api/common'
|
|
5
|
+
|
|
6
|
+
const GetAppDataService = {
|
|
7
|
+
install (Vue) {
|
|
8
|
+
// 给vue增添对话框显示方法
|
|
9
|
+
Vue.$appdata = Vue.prototype.$appdata = GetAppDataService
|
|
10
|
+
},
|
|
11
|
+
async load () {
|
|
12
|
+
const params = {}
|
|
13
|
+
await post(manageApi.getDictionaryValue, {}).then((res) => {
|
|
14
|
+
Object.assign(params, res)
|
|
15
|
+
const badgeItemArray = {}
|
|
16
|
+
for (const key of Object.keys(params)) {
|
|
17
|
+
badgeItemArray[key] = {}
|
|
18
|
+
for (const item of params[key]) {
|
|
19
|
+
let status
|
|
20
|
+
if (!item.status) {
|
|
21
|
+
status = 'none'
|
|
22
|
+
} else {
|
|
23
|
+
status = item.status
|
|
24
|
+
}
|
|
25
|
+
badgeItemArray[key][item.value] = {
|
|
26
|
+
status: status,
|
|
27
|
+
text: item.text
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
// 追加参数
|
|
32
|
+
localStorage.setItem(process.env.VUE_APP_DICTIONARY_KEY, JSON.stringify(params))
|
|
33
|
+
localStorage.setItem(process.env.VUE_APP_BADGE_KEY, JSON.stringify(badgeItemArray))
|
|
34
|
+
})
|
|
35
|
+
},
|
|
36
|
+
// 返回树形省市区
|
|
37
|
+
async getDivisionsOhChinaForTree () {
|
|
38
|
+
// 获取省市区数据
|
|
39
|
+
return new Promise((resolve, reject) => {
|
|
40
|
+
try {
|
|
41
|
+
indexedDB.getByWeb('divisionsOhChina', manageApi.getDivisionsOhChina, {}, res => {
|
|
42
|
+
resolve(res)
|
|
43
|
+
}, processRes => {
|
|
44
|
+
return handleTree(processRes, 'code', 'parentcode')
|
|
45
|
+
})
|
|
46
|
+
} catch (e) {
|
|
47
|
+
reject(e)
|
|
48
|
+
}
|
|
49
|
+
})
|
|
50
|
+
},
|
|
51
|
+
// 旧版获取配置中心字典
|
|
52
|
+
getDictionaryList (key) {
|
|
53
|
+
const str = localStorage.getItem(process.env.VUE_APP_DICTIONARY_KEY)
|
|
54
|
+
const object = JSON.parse(str)
|
|
55
|
+
return object[key]
|
|
56
|
+
},
|
|
57
|
+
async getDictValue (dictKey, value, func, isDev = false, serviceName = process.env.VUE_APP_SYSTEM_NAME) {
|
|
58
|
+
const processResult = (result) => {
|
|
59
|
+
if (!result.value) {
|
|
60
|
+
return {
|
|
61
|
+
status: 'none',
|
|
62
|
+
text: value
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
const item = result.value.find(item => item.value == value)
|
|
66
|
+
if (item) {
|
|
67
|
+
return {
|
|
68
|
+
status: item.status || 'none',
|
|
69
|
+
text: item.label
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
status: 'none',
|
|
74
|
+
text: value
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
if (func) {
|
|
78
|
+
getConfigByName(dictKey, serviceName, result => {
|
|
79
|
+
func(processResult(result))
|
|
80
|
+
}, isDev)
|
|
81
|
+
} else {
|
|
82
|
+
const result = await new Promise((resolve) => {
|
|
83
|
+
getConfigByName(dictKey, serviceName, resolve, isDev)
|
|
84
|
+
})
|
|
85
|
+
return processResult(result)
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
// 新版获取配置中心字典推荐使用 服务名默认为当前服务
|
|
89
|
+
getDictByKey (dictKey, serviceName = process.env.VUE_APP_SYSTEM_NAME, callback, isDev) {
|
|
90
|
+
getConfigByName(dictKey, undefined, result => {
|
|
91
|
+
callback(result.value)
|
|
92
|
+
}, isDev)
|
|
93
|
+
},
|
|
94
|
+
getParam (key, value, callback) {
|
|
95
|
+
const str = localStorage.getItem(process.env.VUE_APP_BADGE_KEY)
|
|
96
|
+
const object = JSON.parse(str)
|
|
97
|
+
if (object && object[key]) {
|
|
98
|
+
const result = object[key]
|
|
99
|
+
if (Object.prototype.hasOwnProperty.call(result, value)) {
|
|
100
|
+
return result[value]
|
|
101
|
+
} else {
|
|
102
|
+
return { status: 'none', text: value }
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return null
|
|
106
|
+
},
|
|
107
|
+
getParams () {
|
|
108
|
+
const str = localStorage.getItem(process.env.VUE_APP_DICTIONARY_KEY)
|
|
109
|
+
return JSON.parse(str)
|
|
110
|
+
},
|
|
111
|
+
getSingleValues () {
|
|
112
|
+
const str = localStorage.getItem(process.env.VUE_APP_BADGE_KEY)
|
|
113
|
+
return JSON.parse(str)
|
|
114
|
+
},
|
|
115
|
+
getWebConfigByKey (key) {
|
|
116
|
+
const str = localStorage.getItem(process.env.VUE_APP_WEB_CONFIG_KEY)
|
|
117
|
+
const object = JSON.parse(str)
|
|
118
|
+
return object[key]
|
|
119
|
+
},
|
|
120
|
+
getStylesByKey (key) {
|
|
121
|
+
const str = localStorage.getItem(process.env.VUE_APP_WEB_STYLES_KEY)
|
|
122
|
+
const object = JSON.parse(str)
|
|
123
|
+
return object[key]
|
|
124
|
+
},
|
|
125
|
+
}
|
|
126
|
+
export default GetAppDataService
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import Program from './core/Program'
|
|
2
|
-
|
|
3
|
-
export default class ExpressionRunner {
|
|
4
|
-
/**
|
|
5
|
-
* Runs an expression with parameters
|
|
6
|
-
*
|
|
7
|
-
* @param source Expression source
|
|
8
|
-
* @param params Expression parameters
|
|
9
|
-
* @returns The result of the expression
|
|
10
|
-
*/
|
|
11
|
-
static async run (source, params) {
|
|
12
|
-
const delegate = this.getDelegate(source)
|
|
13
|
-
return await delegate.invoke(params)
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Gets the delegate for the expression
|
|
18
|
-
*
|
|
19
|
-
* @param source Expression source
|
|
20
|
-
* @returns A delegate to invoke
|
|
21
|
-
*/
|
|
22
|
-
static getDelegate (source) {
|
|
23
|
-
// Parse the source and return a delegate
|
|
24
|
-
return new Program(source).parse()
|
|
25
|
-
}
|
|
26
|
-
}
|
|
1
|
+
import Program from './core/Program'
|
|
2
|
+
|
|
3
|
+
export default class ExpressionRunner {
|
|
4
|
+
/**
|
|
5
|
+
* Runs an expression with parameters
|
|
6
|
+
*
|
|
7
|
+
* @param source Expression source
|
|
8
|
+
* @param params Expression parameters
|
|
9
|
+
* @returns The result of the expression
|
|
10
|
+
*/
|
|
11
|
+
static async run (source, params) {
|
|
12
|
+
const delegate = this.getDelegate(source)
|
|
13
|
+
return await delegate.invoke(params)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Gets the delegate for the expression
|
|
18
|
+
*
|
|
19
|
+
* @param source Expression source
|
|
20
|
+
* @returns A delegate to invoke
|
|
21
|
+
*/
|
|
22
|
+
static getDelegate (source) {
|
|
23
|
+
// Parse the source and return a delegate
|
|
24
|
+
return new Program(source).parse()
|
|
25
|
+
}
|
|
26
|
+
}
|