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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.12.100",
3
+ "version": "1.12.102",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -2,20 +2,17 @@
2
2
  <div>
3
3
  <a-collapse
4
4
  :activeKey="activeKey"
5
- @change="handleChange"
6
- >
5
+ @change="handleChange">
7
6
  <a-collapse-panel
8
7
  v-for="(panel, panelIndex) in config.showData"
9
8
  :key="panelIndex.toString()"
10
9
  :show-arrow="false"
11
- :disabled="config.collapsible"
12
- >
10
+ :disabled="config.collapsible">
13
11
  <template #header>
14
12
  <div class="header-content">
15
13
  <span
16
14
  class="header-text"
17
- :style="config.titleStyle"
18
- >
15
+ :style="config.titleStyle">
19
16
  {{ panel.title }}
20
17
  </span>
21
18
  <!-- 当有 title2 数据时显示信息项 -->
@@ -24,8 +21,7 @@
24
21
  v-for="(item, headerIndex) in panel.title2"
25
22
  :key="headerIndex"
26
23
  class="info-item"
27
- :style="config.title2Style"
28
- >
24
+ :style="config.title2Style">
29
25
  <!-- 根据showTitle是否显示键名 -->
30
26
  <span v-if="item.showTitle">{{ item.key }}:</span>
31
27
  <span>{{ item.value }}</span>
@@ -35,8 +31,7 @@
35
31
  <span
36
32
  v-if="panel.title3"
37
33
  class="time-item"
38
- :style="config.title3Style"
39
- >
34
+ :style="config.title3Style">
40
35
  {{ panel.title3 }}
41
36
  </span>
42
37
  <!-- 修改搜索框的显示条件 -->
@@ -46,8 +41,7 @@
46
41
  :placeholder="panel.searchPlace"
47
42
  class="search-input"
48
43
  @search="(value) => onSearch(value, panelIndex)"
49
- @click.stop
50
- />
44
+ @click.stop/>
51
45
  </div>
52
46
  </template>
53
47
  <!-- 根据类型显示不同内容 -->
@@ -60,11 +54,11 @@
60
54
  :ref="`dynamicComponent_${ panel.type }`"
61
55
  serverName="af-his"
62
56
  :queryParamsName="panel.configName"
57
+ :parameter="panel.parameter"
63
58
  :countVisible="false"
64
59
  :env="env"
65
60
  @listClick="listClick"
66
- @click="click"
67
- />
61
+ @click="click"/>
68
62
  </template>
69
63
  </a-collapse-panel>
70
64
  </a-collapse>
@@ -0,0 +1,15 @@
1
+ <template>
2
+ <x-collapse :query-params-name="openPrescriptionConfig" />
3
+ </template>
4
+
5
+ <script>
6
+ import XCollapse from '@vue2-client/base-client/components/common/XCollapse/XCollapse.vue'
7
+ export default {
8
+ name: 'Demo',
9
+ components: { XCollapse }
10
+ }
11
+ </script>
12
+
13
+ <style scoped>
14
+
15
+ </style>
@@ -1,3 +1,3 @@
1
- import XReport from './XReport'
2
-
3
- export default XReport
1
+ import XReport from './XReport'
2
+
3
+ export default XReport
@@ -1,44 +1,44 @@
1
- <template>
2
- <div id="test">
3
- <a-card :bordered="false">
4
- <XReport
5
- ref="main"
6
- :use-oss-for-img="false"
7
- config-name="openPrescriptionCover"
8
- server-name="af-his"
9
- :show-img-in-cell="true"
10
- :display-only="true"
11
- :edit-mode="false"
12
- :dont-format="true"/>
13
- </a-card>
14
- </div>
15
- </template>
16
-
17
- <script>
18
- import XReport from './XReport'
19
- import XAddReport from '../XAddReport/XAddReport.vue'
20
- // eslint-disable-next-line no-unused-vars
21
-
22
- export default {
23
- name: 'XReportDemo',
24
- components: {
25
- XReport, XAddReport
26
- },
27
- mounted () {
28
- // this.$refs.xAddReport.init({
29
- // configName: 'skinTestExecuActionCover',
30
- // selectedId: '11111',
31
- // mixinData: {}
32
- // })
33
- },
34
- data () {
35
- return {
36
- }
37
- },
38
- methods: {
39
- }
40
- }
41
- </script>
42
- <style scoped>
43
-
44
- </style>
1
+ <template>
2
+ <div id="test">
3
+ <a-card :bordered="false">
4
+ <XReport
5
+ ref="main"
6
+ :use-oss-for-img="false"
7
+ config-name="openPrescriptionCover"
8
+ server-name="af-his"
9
+ :show-img-in-cell="true"
10
+ :display-only="true"
11
+ :edit-mode="false"
12
+ :dont-format="true"/>
13
+ </a-card>
14
+ </div>
15
+ </template>
16
+
17
+ <script>
18
+ import XReport from './XReport'
19
+ import XAddReport from '../XAddReport/XAddReport.vue'
20
+ // eslint-disable-next-line no-unused-vars
21
+
22
+ export default {
23
+ name: 'XReportDemo',
24
+ components: {
25
+ XReport, XAddReport
26
+ },
27
+ mounted () {
28
+ // this.$refs.xAddReport.init({
29
+ // configName: 'skinTestExecuActionCover',
30
+ // selectedId: '11111',
31
+ // mixinData: {}
32
+ // })
33
+ },
34
+ data () {
35
+ return {
36
+ }
37
+ },
38
+ methods: {
39
+ }
40
+ }
41
+ </script>
42
+ <style scoped>
43
+
44
+ </style>
@@ -43,6 +43,12 @@ export default {
43
43
  queryParamsName: {
44
44
  type: String,
45
45
  default: 'DescriptionsExampleConfig'
46
+ },
47
+ parameter: {
48
+ type: Object,
49
+ default: () => {
50
+ return {}
51
+ }
46
52
  }
47
53
  },
48
54
  created () {
@@ -54,7 +60,8 @@ export default {
54
60
  getConfigByName(data, 'af-his', res => {
55
61
  this.configurationParameters = res
56
62
  console.log(this.configurationParameters)
57
- runLogic(res.logicName, res.parameter, 'af-his').then(result => {
63
+ const parameter = { ...res.parameter, ...this.parameter }
64
+ runLogic(res.logicName, parameter, 'af-his').then(result => {
58
65
  this.data = result
59
66
  })
60
67
  })
@@ -1,131 +1,131 @@
1
- <template>
2
- <div class="list-wrapper">
3
- <a-list size="large" :data-source="data" itemLayout="horizontal" class="list-container" ref="listRef">
4
- <a-list-item slot="renderItem" slot-scope="item, index" class="list-item" @click="handleClick(index)">
5
- <i
6
- v-if="icon"
7
- class="icon-menu"
8
- :style="getIconStyle(item)"
9
- ></i>
10
- <span
11
- class="item-text">
12
- {{ item.number }} {{ item.name }}
13
- </span>
14
- <a-button v-if="button" type="link" class="confirm-btn" @click.stop="click(index)">{{ buttonName }}</a-button>
15
- </a-list-item>
16
- </a-list>
17
- </div>
18
- </template>
19
-
20
- <script>
21
-
22
- import { runLogic } from '@vue2-client/services/api/common'
23
-
24
- export default {
25
- name: 'XList',
26
- props: {
27
- queryParamsName: {
28
- type: Object,
29
- default: null
30
- }
31
- },
32
- inject: ['getComponentByName'],
33
- data () {
34
- return {
35
- data: [],
36
- button: false,
37
- icon: false,
38
- buttonName: ''
39
- }
40
- },
41
- created () {
42
- this.getData(this.queryParamsName)
43
- },
44
- methods: {
45
- async getData (config) {
46
- runLogic(config, {}, 'af-his').then(res => {
47
- this.button = res.button
48
- this.icon = res.icon
49
- this.buttonName = res.buttonName
50
- this.data = res.data
51
- })
52
- },
53
- handleClick (index) {
54
- this.$emit('listClick', this.data[index])
55
- },
56
- refreshList () {
57
- this.getData(this.queryParamsName)
58
- },
59
- click (index) {
60
- this.$emit('click', this.data[index])
61
- },
62
- getIconStyle (item) {
63
- return item.picture
64
- ? { backgroundImage: `url(${item.picture})` }
65
- : {}
66
- },
67
- filterData (par) {
68
- runLogic(this.queryParamsName, par, 'af-his').then(res => {
69
- this.data = res.data
70
- })
71
- }
72
- }
73
- }
74
- </script>
75
-
76
- <style scoped>
77
- .list-wrapper {
78
- max-height: 240px;
79
- overflow-y: auto;
80
- padding-right: 2px;
81
- }
82
-
83
- .list-container {
84
- width: 100%;
85
- }
86
-
87
- .list-item {
88
- height: 35px;
89
- border-radius: 6px;
90
- background-color: #F4F4F4;
91
- padding: 8px 15px;
92
- font-size: 16px;
93
- display: flex;
94
- align-items: center;
95
- width: 100%;
96
- border: 1px solid #D9D9D9;
97
- box-sizing: border-box;
98
- margin-bottom: 8px !important;
99
- }
100
-
101
- .icon-menu {
102
- display: inline-block;
103
- width: 20px;
104
- height: 20px;
105
- background-color: #ccc;
106
- margin-right: 8px;
107
- }
108
-
109
- .item-text {
110
- flex: 1;
111
- }
112
-
113
- .confirm-btn {
114
- margin-left: auto;
115
- padding: 0 8px;
116
- }
117
-
118
- /* 自定义滚动条样式 */
119
- .list-wrapper::-webkit-scrollbar {
120
- width: 6px;
121
- }
122
-
123
- .list-wrapper::-webkit-scrollbar-thumb {
124
- background-color: #d9d9d9;
125
- border-radius: 3px;
126
- }
127
-
128
- .list-wrapper::-webkit-scrollbar-track {
129
- background-color: #f0f0f0;
130
- }
131
- </style>
1
+ <template>
2
+ <div class="list-wrapper">
3
+ <a-list size="large" :data-source="data" itemLayout="horizontal" class="list-container" ref="listRef">
4
+ <a-list-item slot="renderItem" slot-scope="item, index" class="list-item" @click="handleClick(index)">
5
+ <i
6
+ v-if="icon"
7
+ class="icon-menu"
8
+ :style="getIconStyle(item)"
9
+ ></i>
10
+ <span
11
+ class="item-text">
12
+ {{ item.number }} {{ item.name }}
13
+ </span>
14
+ <a-button v-if="button" type="link" class="confirm-btn" @click.stop="click(index)">{{ buttonName }}</a-button>
15
+ </a-list-item>
16
+ </a-list>
17
+ </div>
18
+ </template>
19
+
20
+ <script>
21
+
22
+ import { runLogic } from '@vue2-client/services/api/common'
23
+
24
+ export default {
25
+ name: 'XList',
26
+ props: {
27
+ queryParamsName: {
28
+ type: Object,
29
+ default: null
30
+ }
31
+ },
32
+ inject: ['getComponentByName'],
33
+ data () {
34
+ return {
35
+ data: [],
36
+ button: false,
37
+ icon: false,
38
+ buttonName: ''
39
+ }
40
+ },
41
+ created () {
42
+ this.getData(this.queryParamsName)
43
+ },
44
+ methods: {
45
+ async getData (config) {
46
+ runLogic(config, {}, 'af-his').then(res => {
47
+ this.button = res.button
48
+ this.icon = res.icon
49
+ this.buttonName = res.buttonName
50
+ this.data = res.data
51
+ })
52
+ },
53
+ handleClick (index) {
54
+ this.$emit('listClick', this.data[index])
55
+ },
56
+ refreshList () {
57
+ this.getData(this.queryParamsName)
58
+ },
59
+ click (index) {
60
+ this.$emit('click', this.data[index])
61
+ },
62
+ getIconStyle (item) {
63
+ return item.picture
64
+ ? { backgroundImage: `url(${item.picture})` }
65
+ : {}
66
+ },
67
+ filterData (par) {
68
+ runLogic(this.queryParamsName, par, 'af-his').then(res => {
69
+ this.data = res.data
70
+ })
71
+ }
72
+ }
73
+ }
74
+ </script>
75
+
76
+ <style scoped>
77
+ .list-wrapper {
78
+ max-height: 240px;
79
+ overflow-y: auto;
80
+ padding-right: 2px;
81
+ }
82
+
83
+ .list-container {
84
+ width: 100%;
85
+ }
86
+
87
+ .list-item {
88
+ height: 35px;
89
+ border-radius: 6px;
90
+ background-color: #F4F4F4;
91
+ padding: 8px 15px;
92
+ font-size: 16px;
93
+ display: flex;
94
+ align-items: center;
95
+ width: 100%;
96
+ border: 1px solid #D9D9D9;
97
+ box-sizing: border-box;
98
+ margin-bottom: 8px !important;
99
+ }
100
+
101
+ .icon-menu {
102
+ display: inline-block;
103
+ width: 20px;
104
+ height: 20px;
105
+ background-color: #ccc;
106
+ margin-right: 8px;
107
+ }
108
+
109
+ .item-text {
110
+ flex: 1;
111
+ }
112
+
113
+ .confirm-btn {
114
+ margin-left: auto;
115
+ padding: 0 8px;
116
+ }
117
+
118
+ /* 自定义滚动条样式 */
119
+ .list-wrapper::-webkit-scrollbar {
120
+ width: 6px;
121
+ }
122
+
123
+ .list-wrapper::-webkit-scrollbar-thumb {
124
+ background-color: #d9d9d9;
125
+ border-radius: 3px;
126
+ }
127
+
128
+ .list-wrapper::-webkit-scrollbar-track {
129
+ background-color: #f0f0f0;
130
+ }
131
+ </style>
@@ -10,7 +10,7 @@
10
10
  {{ isOpen ? '›' : '‹' }}
11
11
  </div>
12
12
  </div>
13
- <div class="drawer-content" v-if="isOpen">
13
+ <div class="drawer-content" v-show="isOpen">
14
14
  <x-report
15
15
  ref="x_report"
16
16
  :configName="queryParamsName"
@@ -56,12 +56,38 @@ export default {
56
56
  mounted () {
57
57
  // 在挂载后调整父元素宽度
58
58
  this.updateLayout(this.isOpen)
59
+ // 如果抽屉初始状态为打开,设置padding
60
+ if (this.isOpen) {
61
+ this.updateCardBodyPadding()
62
+ }
59
63
  },
60
64
  methods: {
61
65
  toggleDrawer () {
62
66
  this.isOpen = !this.isOpen
63
67
  this.$emit('on-drawer-change', this.isOpen)
64
68
  this.updateLayout(this.isOpen)
69
+ if (this.isOpen) {
70
+ this.$nextTick(() => {
71
+ this.updateCardBodyPadding()
72
+ })
73
+ }
74
+ },
75
+ // 更新card-body的padding
76
+ updateCardBodyPadding () {
77
+ this.$nextTick(() => {
78
+ const cardBody = this.$el.querySelector('.ant-card-body')
79
+ if (cardBody) {
80
+ cardBody.style.padding = '3%'
81
+ } else {
82
+ // 如果找不到元素,可能需要等待XReport完全渲染
83
+ setTimeout(() => {
84
+ const cardBody = this.$el.querySelector('.ant-card-body')
85
+ if (cardBody) {
86
+ cardBody.style.padding = '3%'
87
+ }
88
+ }, 500)
89
+ }
90
+ })
65
91
  },
66
92
  // 获取同级的其他所有a-col元素
67
93
  getSiblingCols () {