vue2-client 1.12.100 → 1.12.101
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/XReport/index.js +3 -3
- package/src/base-client/components/his/XSidebar/XSidebar.vue +30 -4
- 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/router/async/router.map.js +2 -2
- package/src/services/api/entity.js +18 -18
- package/src/utils/waterMark.js +31 -31
package/package.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import XReport from './XReport'
|
|
2
|
-
|
|
3
|
-
export default XReport
|
|
1
|
+
import XReport from './XReport'
|
|
2
|
+
|
|
3
|
+
export default XReport
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
{{ isOpen ? '›' : '‹' }}
|
|
11
11
|
</div>
|
|
12
12
|
</div>
|
|
13
|
-
<div class="drawer-content" v-
|
|
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 () {
|
|
@@ -101,14 +127,14 @@ export default {
|
|
|
101
127
|
currentCol = currentCol.parentNode
|
|
102
128
|
}
|
|
103
129
|
if (currentCol) {
|
|
104
|
-
//
|
|
130
|
+
// 更新当前列的宽度
|
|
105
131
|
const drawerWidth = isOpen ? 33.3 : 2
|
|
106
132
|
// 强制更新样式
|
|
107
133
|
currentCol.style.cssText = `
|
|
108
134
|
flex: 0 0 ${drawerWidth}% !important;
|
|
109
135
|
max-width: ${drawerWidth}% !important;
|
|
110
136
|
transition: all 0.3s;`
|
|
111
|
-
//
|
|
137
|
+
// 触发XTab组件重新计算宽度
|
|
112
138
|
this.$nextTick(() => {
|
|
113
139
|
const tabComponent = this.$el.querySelector('.ant-tabs')
|
|
114
140
|
if (tabComponent) {
|
|
@@ -116,7 +142,7 @@ export default {
|
|
|
116
142
|
window.dispatchEvent(new Event('resize'))
|
|
117
143
|
}
|
|
118
144
|
})
|
|
119
|
-
//
|
|
145
|
+
// 更新其他列宽度
|
|
120
146
|
otherCols.forEach((col, index) => {
|
|
121
147
|
if (index < this.mainWithData.length) {
|
|
122
148
|
const widthValue = isOpen ? this.mainWithData[index].min : this.mainWithData[index].max
|
|
@@ -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
|
+
}
|