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.
Files changed (33) hide show
  1. package/package.json +1 -1
  2. package/src/base-client/components/common/XCollapse/XCollapse.vue +8 -14
  3. package/src/base-client/components/common/XCollapse/XCollapseDemo.vue +15 -0
  4. package/src/base-client/components/common/XReport/index.js +3 -3
  5. package/src/base-client/components/common/XReportGrid/XReportDemo.vue +44 -44
  6. package/src/base-client/components/his/XHDescriptions/XHDescriptions.vue +8 -1
  7. package/src/base-client/components/his/XList/XList.vue +131 -131
  8. package/src/base-client/components/his/XSidebar/XSidebar.vue +27 -1
  9. package/src/base-client/plugins/AppData.js +126 -126
  10. package/src/expression/ExpressionRunner.js +26 -26
  11. package/src/expression/TestExpression.js +509 -509
  12. package/src/expression/core/Delegate.js +115 -115
  13. package/src/expression/core/Expression.js +1358 -1358
  14. package/src/expression/core/Program.js +932 -932
  15. package/src/expression/core/Token.js +27 -27
  16. package/src/expression/enums/ExpressionType.js +81 -81
  17. package/src/expression/enums/TokenType.js +11 -11
  18. package/src/expression/exception/BreakWayException.js +2 -2
  19. package/src/expression/exception/ContinueWayException.js +2 -2
  20. package/src/expression/exception/ExpressionException.js +28 -28
  21. package/src/expression/exception/ReturnWayException.js +14 -14
  22. package/src/expression/exception/ServiceException.js +22 -22
  23. package/src/expression/instances/LogicConsole.js +44 -44
  24. package/src/logic/LogicRunner.js +62 -62
  25. package/src/logic/TestLogic.js +13 -13
  26. package/src/logic/plugins/common/VueTools.js +30 -30
  27. package/src/logic/ts/LogicRunner.ts +67 -67
  28. package/src/logic/ts/TestLogic.ts +13 -13
  29. package/src/pages/DynamicStatistics/FavoriteList.vue +50 -50
  30. package/src/pages/ReportGrid/index.vue +76 -76
  31. package/src/router/async/router.map.js +124 -119
  32. package/src/services/api/entity.js +18 -18
  33. package/src/utils/waterMark.js +31 -31
@@ -1,30 +1,30 @@
1
- /**
2
- * Vue工具类
3
- */
4
- export default class VueTools {
5
- static instance = new VueTools()
6
-
7
- constructor () {
8
- if (VueTools.instance) {
9
- return VueTools.instance
10
- }
11
- VueTools.instance = this
12
- }
13
-
14
- static getInstance () {
15
- if (!VueTools.instance) {
16
- VueTools.instance = new VueTools()
17
- }
18
- return VueTools.instance
19
- }
20
-
21
- /**
22
- * 获取组件实例
23
- * @param vueRef vue实例
24
- * @param componentName 组件实例名(refName)
25
- * @returns {VueComponent}
26
- */
27
- getComponent (vueRef, componentName) {
28
- return vueRef.$refs[componentName]
29
- }
30
- }
1
+ /**
2
+ * Vue工具类
3
+ */
4
+ export default class VueTools {
5
+ static instance = new VueTools()
6
+
7
+ constructor () {
8
+ if (VueTools.instance) {
9
+ return VueTools.instance
10
+ }
11
+ VueTools.instance = this
12
+ }
13
+
14
+ static getInstance () {
15
+ if (!VueTools.instance) {
16
+ VueTools.instance = new VueTools()
17
+ }
18
+ return VueTools.instance
19
+ }
20
+
21
+ /**
22
+ * 获取组件实例
23
+ * @param vueRef vue实例
24
+ * @param componentName 组件实例名(refName)
25
+ * @returns {VueComponent}
26
+ */
27
+ getComponent (vueRef, componentName) {
28
+ return vueRef.$refs[componentName]
29
+ }
30
+ }
@@ -1,67 +1,67 @@
1
- import JSONObject from "../../expression/instances/JSONObject";
2
- import ServiceException from "../../expression/exception/ServiceException";
3
- import LogicConsole from "../../expression/instances/LogicConsole";
4
- import ExpressionRunner from "../../expression/ExpressionRunner";
5
- import { indexedDB } from '../../utils/indexedDB'
6
-
7
- export default class LogicRunner {
8
-
9
- private static logicConsoleInstance: LogicConsole = new LogicConsole();
10
-
11
- /**
12
- * 是否存在指定名称的Logic资源
13
- *
14
- * @param logicName Logic名称
15
- * @return 是否存在
16
- */
17
- public static has(logicName: string): boolean {
18
- return LogicRunner.getLogic(logicName, false, (result: any) => {
19
- return result != null;
20
- });
21
- }
22
-
23
- /**
24
- * 执行Logic
25
- *
26
- * @param logicName Logic名称
27
- * @param param 参数
28
- * @return 执行结果
29
- */
30
- public static run(logicName: string, param: JSONObject | Object) : any {
31
- // 获取Logic资源
32
- const source = LogicRunner.getLogic(logicName, false, (result: any) => {
33
- return result;
34
- });
35
- if (source == null) {
36
- throw new ServiceException("Logic资源" + logicName + "未找到", 400)
37
- }
38
- LogicRunner.logicConsoleInstance.info("执行Logic[{}],params: {}", logicName, param)
39
- // 附加用户注册的对象到业务逻辑中
40
- const plugins = new JSONObject();
41
- plugins.put("data", param);
42
- plugins.put("log", LogicRunner.logicConsoleInstance);
43
- plugins.put("logic", LogicRunner.prototype);
44
- return LogicRunner.runExpression(source, plugins);
45
- }
46
-
47
- /**
48
- * 执行原生表达式
49
- *
50
- * @param source 表达式内容
51
- * @param params 参数
52
- * @return 执行结果
53
- */
54
- private static runExpression(source: string, params: JSONObject) : any {
55
- return ExpressionRunner.run(source, params)
56
- }
57
-
58
- private static getLogic(logicName: string, isDev: boolean, callback: Function) : any {
59
- let apiPre = '/api/'
60
- if (isDev) {
61
- apiPre = '/devApi/'
62
- }
63
- const serviceName = process.env.VUE_APP_SYSTEM_NAME
64
- const getConfigUrl = apiPre + serviceName + '/logic/openapi/getLiuliConfiguration'
65
- indexedDB.getByWeb(logicName, getConfigUrl, {configName: logicName}, callback)
66
- }
67
- }
1
+ import JSONObject from "../../expression/instances/JSONObject";
2
+ import ServiceException from "../../expression/exception/ServiceException";
3
+ import LogicConsole from "../../expression/instances/LogicConsole";
4
+ import ExpressionRunner from "../../expression/ExpressionRunner";
5
+ import { indexedDB } from '../../utils/indexedDB'
6
+
7
+ export default class LogicRunner {
8
+
9
+ private static logicConsoleInstance: LogicConsole = new LogicConsole();
10
+
11
+ /**
12
+ * 是否存在指定名称的Logic资源
13
+ *
14
+ * @param logicName Logic名称
15
+ * @return 是否存在
16
+ */
17
+ public static has(logicName: string): boolean {
18
+ return LogicRunner.getLogic(logicName, false, (result: any) => {
19
+ return result != null;
20
+ });
21
+ }
22
+
23
+ /**
24
+ * 执行Logic
25
+ *
26
+ * @param logicName Logic名称
27
+ * @param param 参数
28
+ * @return 执行结果
29
+ */
30
+ public static run(logicName: string, param: JSONObject | Object) : any {
31
+ // 获取Logic资源
32
+ const source = LogicRunner.getLogic(logicName, false, (result: any) => {
33
+ return result;
34
+ });
35
+ if (source == null) {
36
+ throw new ServiceException("Logic资源" + logicName + "未找到", 400)
37
+ }
38
+ LogicRunner.logicConsoleInstance.info("执行Logic[{}],params: {}", logicName, param)
39
+ // 附加用户注册的对象到业务逻辑中
40
+ const plugins = new JSONObject();
41
+ plugins.put("data", param);
42
+ plugins.put("log", LogicRunner.logicConsoleInstance);
43
+ plugins.put("logic", LogicRunner.prototype);
44
+ return LogicRunner.runExpression(source, plugins);
45
+ }
46
+
47
+ /**
48
+ * 执行原生表达式
49
+ *
50
+ * @param source 表达式内容
51
+ * @param params 参数
52
+ * @return 执行结果
53
+ */
54
+ private static runExpression(source: string, params: JSONObject) : any {
55
+ return ExpressionRunner.run(source, params)
56
+ }
57
+
58
+ private static getLogic(logicName: string, isDev: boolean, callback: Function) : any {
59
+ let apiPre = '/api/'
60
+ if (isDev) {
61
+ apiPre = '/devApi/'
62
+ }
63
+ const serviceName = process.env.VUE_APP_SYSTEM_NAME
64
+ const getConfigUrl = apiPre + serviceName + '/logic/openapi/getLiuliConfiguration'
65
+ indexedDB.getByWeb(logicName, getConfigUrl, {configName: logicName}, callback)
66
+ }
67
+ }
@@ -1,13 +1,13 @@
1
- import LogicRunner from './LogicRunner'
2
-
3
- testLogicCall()
4
-
5
- /**
6
- * testLogicCall
7
- */
8
- function testLogicCall () {
9
- const result = LogicRunner.run('testVueLogic', {
10
- test: '1'
11
- })
12
- console.info(result)
13
- }
1
+ import LogicRunner from './LogicRunner'
2
+
3
+ testLogicCall()
4
+
5
+ /**
6
+ * testLogicCall
7
+ */
8
+ function testLogicCall () {
9
+ const result = LogicRunner.run('testVueLogic', {
10
+ test: '1'
11
+ })
12
+ console.info(result)
13
+ }
@@ -1,50 +1,50 @@
1
- <template>
2
- <div>
3
- <a-list v-show="!loading" size="small" :data-source="data">
4
- <a-list-item slot="renderItem" slot-scope="item">
5
- <div>
6
- <p><a @click="$emit('openFavorites', item.uuid)">{{ item.question }} </a></p>
7
- <p>{{ item.date }}</p>
8
- </div>
9
- <a class="delete_item">
10
- <a-icon type="close" @click="$emit('saveToFavorites', item.uuid)"/>
11
- </a>
12
- </a-list-item>
13
- </a-list>
14
- </div>
15
- </template>
16
-
17
- <script>
18
- import { indexedDB } from '@vue2-client/utils/indexedDB'
19
-
20
- export default {
21
- name: 'FavoriteList',
22
- data () {
23
- return {
24
- data: [],
25
- loading: false
26
- }
27
- },
28
- mounted () {
29
- this.loadData()
30
- },
31
- methods: {
32
- loadData () {
33
- indexedDB.getAll((data) => {
34
- const realData = data.filter(item => item.data && item.data.uuid)
35
- .map(item => item.data)
36
- this.data = realData
37
- })
38
- }
39
- }
40
- }
41
- </script>
42
- <style lang="less" scoped>
43
- .delete_item {
44
- margin-left: 8px;
45
- color: #333;
46
- }
47
- p {
48
- margin: 0
49
- }
50
- </style>
1
+ <template>
2
+ <div>
3
+ <a-list v-show="!loading" size="small" :data-source="data">
4
+ <a-list-item slot="renderItem" slot-scope="item">
5
+ <div>
6
+ <p><a @click="$emit('openFavorites', item.uuid)">{{ item.question }} </a></p>
7
+ <p>{{ item.date }}</p>
8
+ </div>
9
+ <a class="delete_item">
10
+ <a-icon type="close" @click="$emit('saveToFavorites', item.uuid)"/>
11
+ </a>
12
+ </a-list-item>
13
+ </a-list>
14
+ </div>
15
+ </template>
16
+
17
+ <script>
18
+ import { indexedDB } from '@vue2-client/utils/indexedDB'
19
+
20
+ export default {
21
+ name: 'FavoriteList',
22
+ data () {
23
+ return {
24
+ data: [],
25
+ loading: false
26
+ }
27
+ },
28
+ mounted () {
29
+ this.loadData()
30
+ },
31
+ methods: {
32
+ loadData () {
33
+ indexedDB.getAll((data) => {
34
+ const realData = data.filter(item => item.data && item.data.uuid)
35
+ .map(item => item.data)
36
+ this.data = realData
37
+ })
38
+ }
39
+ }
40
+ }
41
+ </script>
42
+ <style lang="less" scoped>
43
+ .delete_item {
44
+ margin-left: 8px;
45
+ color: #333;
46
+ }
47
+ p {
48
+ margin: 0
49
+ }
50
+ </style>
@@ -1,76 +1,76 @@
1
- <template>
2
- <div id="test" v-if="showReport">
3
- <XReport
4
- @updateImg="updateImg"
5
- ref="main"
6
- :use-oss-for-img="false"
7
- config-name="outpatientWait"
8
- server-name="af-his"
9
- :show-img-in-cell="true"
10
- :display-only="displayOnly"
11
- :edit-mode="false"
12
- :show-save-button="false"
13
- :dont-format="true"/>
14
- </div>
15
- </template>
16
-
17
- <script>
18
- import XReport from '@vue2-client/base-client/components/common/XReportGrid/XReport'
19
- // eslint-disable-next-line no-unused-vars
20
- import { exportHTMLNodeToPDF } from '@vue2-client/utils/htmlToPDFApi'
21
-
22
- export default {
23
- name: 'Example',
24
- components: {
25
- XReport
26
- },
27
- mounted () {
28
- console.log(this.$route)
29
- },
30
- data () {
31
- return {
32
- test: {
33
- title: {
34
- type: 'titleKey',
35
- value: 'f_type'
36
- },
37
- designMode: 'json',
38
- },
39
- total: 1,
40
- registerMap: [],
41
- displayOnly: true,
42
- showReport: true
43
- }
44
- },
45
- methods: {
46
- updateImg (data) {
47
- console.warn('demo', data)
48
- },
49
- testExport () {
50
- this.showReport = false
51
- this.displayOnly = true
52
- this.$nextTick(() => {
53
- this.showReport = true
54
- setTimeout(() => {
55
- exportHTMLNodeToPDF('123', '#test')
56
- this.showReport = false
57
- this.displayOnly = false
58
- this.$nextTick(() => {
59
- this.showReport = true
60
- })
61
- }, 500)
62
- })
63
- },
64
- testSave () {
65
- const result = []
66
- this.registerMap.forEach(item => {
67
- result.push(item.exportData())
68
- })
69
- console.warn('save', result)
70
- }
71
- }
72
- }
73
- </script>
74
- <style scoped>
75
-
76
- </style>
1
+ <template>
2
+ <div id="test" v-if="showReport">
3
+ <XReport
4
+ @updateImg="updateImg"
5
+ ref="main"
6
+ :use-oss-for-img="false"
7
+ config-name="outpatientWait"
8
+ server-name="af-his"
9
+ :show-img-in-cell="true"
10
+ :display-only="displayOnly"
11
+ :edit-mode="false"
12
+ :show-save-button="false"
13
+ :dont-format="true"/>
14
+ </div>
15
+ </template>
16
+
17
+ <script>
18
+ import XReport from '@vue2-client/base-client/components/common/XReportGrid/XReport'
19
+ // eslint-disable-next-line no-unused-vars
20
+ import { exportHTMLNodeToPDF } from '@vue2-client/utils/htmlToPDFApi'
21
+
22
+ export default {
23
+ name: 'Example',
24
+ components: {
25
+ XReport
26
+ },
27
+ mounted () {
28
+ console.log(this.$route)
29
+ },
30
+ data () {
31
+ return {
32
+ test: {
33
+ title: {
34
+ type: 'titleKey',
35
+ value: 'f_type'
36
+ },
37
+ designMode: 'json',
38
+ },
39
+ total: 1,
40
+ registerMap: [],
41
+ displayOnly: true,
42
+ showReport: true
43
+ }
44
+ },
45
+ methods: {
46
+ updateImg (data) {
47
+ console.warn('demo', data)
48
+ },
49
+ testExport () {
50
+ this.showReport = false
51
+ this.displayOnly = true
52
+ this.$nextTick(() => {
53
+ this.showReport = true
54
+ setTimeout(() => {
55
+ exportHTMLNodeToPDF('123', '#test')
56
+ this.showReport = false
57
+ this.displayOnly = false
58
+ this.$nextTick(() => {
59
+ this.showReport = true
60
+ })
61
+ }, 500)
62
+ })
63
+ },
64
+ testSave () {
65
+ const result = []
66
+ this.registerMap.forEach(item => {
67
+ result.push(item.exportData())
68
+ })
69
+ console.warn('save', result)
70
+ }
71
+ }
72
+ }
73
+ </script>
74
+ <style scoped>
75
+
76
+ </style>