waibu-db 2.34.1 → 2.34.3
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/extend/bajoTemplate/partial/crud/_list-btns.html +1 -1
- package/extend/bajoTemplate/partial/crud/~echarts-window.html +1 -1
- package/extend/waibuBootstrap/theme/component/widget/data-table.js +2 -2
- package/extend/waibuBootstrap/theme/component/widget/echarts-bar.js +12 -5
- package/extend/waibuBootstrap/theme/component/widget/echarts-pie.js +3 -3
- package/lib/crud/helper.js +1 -1
- package/package.json +1 -1
- package/wiki/CHANGES.md +8 -0
|
@@ -37,13 +37,13 @@ async function table () {
|
|
|
37
37
|
const count = get(locals, 'list.count', 0)
|
|
38
38
|
const allowed = await this.isActionAllowed('READ')
|
|
39
39
|
if (!allowed) {
|
|
40
|
-
const alert = '<c:alert color="error" t:content="accessDenied" margin="top-4"/>'
|
|
40
|
+
const alert = '<c:alert color="error" t:content="accessDenied" margin="top-4 x-4"/>'
|
|
41
41
|
this.params.noTag = true
|
|
42
42
|
this.params.html = await buildSentence(alert)
|
|
43
43
|
return
|
|
44
44
|
}
|
|
45
45
|
if (count === 0 || data.length === 0) {
|
|
46
|
-
const alert = '<c:alert color="warning" t:content="noRecordFound" margin="top-4"/>'
|
|
46
|
+
const alert = '<c:alert color="warning" t:content="noRecordFound" margin="top-4 x-4"/>'
|
|
47
47
|
this.params.noTag = true
|
|
48
48
|
this.params.html = await buildSentence(alert)
|
|
49
49
|
return
|
|
@@ -7,6 +7,7 @@ async function echartsBar () {
|
|
|
7
7
|
build = async () => {
|
|
8
8
|
const { jsonStringify } = this.app.waibuMpa
|
|
9
9
|
const { merge } = this.app.lib._
|
|
10
|
+
const style = this.params.attr.type ?? 'bar'
|
|
10
11
|
merge(this.setting, {
|
|
11
12
|
tooltip: {
|
|
12
13
|
trigger: 'axis',
|
|
@@ -33,21 +34,27 @@ async function echartsBar () {
|
|
|
33
34
|
},
|
|
34
35
|
series: [{
|
|
35
36
|
data: [],
|
|
36
|
-
type:
|
|
37
|
+
type: style
|
|
37
38
|
}]
|
|
38
39
|
})
|
|
39
40
|
const onLoad = []
|
|
40
41
|
const remote = this.params.attr.remote ? this._parseBase64Attr(this.params.attr.remote) : {}
|
|
41
42
|
const data = [
|
|
42
|
-
`async load (params) {
|
|
43
|
+
`async load (params = {}) {
|
|
43
44
|
this.chart.showLoading('default', { text: '' })
|
|
44
|
-
const remote = params ?? ${jsonStringify(remote, true)}
|
|
45
|
+
const remote = params.remote ?? ${jsonStringify(remote, true)}
|
|
45
46
|
const agg = remote.filter.aggregate ?? 'count'
|
|
46
47
|
const recs = await wmpa.fetchApi(remote.url, { fetching: false }, remote.filter)
|
|
47
48
|
this.chart.hideLoading()
|
|
48
|
-
|
|
49
|
+
let smooth = false
|
|
50
|
+
let style = params.style ?? '${style}'
|
|
51
|
+
if (style === 'lineSmooth') {
|
|
52
|
+
smooth = true
|
|
53
|
+
style = 'line'
|
|
54
|
+
}
|
|
55
|
+
this.option = params.option ?? {
|
|
49
56
|
xAxis: { data: _.map(recs, remote.key.name) },
|
|
50
|
-
series: [{ type:
|
|
57
|
+
series: [{ type: style, smooth, data: _.map(recs, remote.key.value ?? agg ) }]
|
|
51
58
|
}
|
|
52
59
|
}`
|
|
53
60
|
]
|
|
@@ -19,16 +19,16 @@ async function echartsPie () {
|
|
|
19
19
|
const onLoad = []
|
|
20
20
|
const remote = this.params.attr.remote ? this._parseBase64Attr(this.params.attr.remote) : {}
|
|
21
21
|
const data = [
|
|
22
|
-
`async load (params) {
|
|
22
|
+
`async load (params = {}) {
|
|
23
23
|
this.chart.showLoading('default', { text: '' })
|
|
24
|
-
const remote = params ?? ${jsonStringify(remote, true)}
|
|
24
|
+
const remote = params.remote ?? ${jsonStringify(remote, true)}
|
|
25
25
|
const agg = remote.filter.aggregate ?? 'count'
|
|
26
26
|
const keyName = remote.key.name ?? remote.filter.group
|
|
27
27
|
const keyValue = remote.key.value ?? keyName + _.upperFirst(agg)
|
|
28
28
|
const recs = await wmpa.fetchApi(remote.url, { fetching: false }, remote.filter)
|
|
29
29
|
const data = recs.map(r => ({ name: r[keyName], value: r[keyValue] }))
|
|
30
30
|
this.chart.hideLoading()
|
|
31
|
-
this.option = { series: [{ type: 'pie', data }]}
|
|
31
|
+
this.option = params.option ?? { series: [{ type: 'pie', data }]}
|
|
32
32
|
}`
|
|
33
33
|
]
|
|
34
34
|
if (!this.params.attr.noAutoLoad) {
|
package/lib/crud/helper.js
CHANGED
package/package.json
CHANGED
package/wiki/CHANGES.md
CHANGED
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
# Changes
|
|
2
2
|
|
|
3
|
+
## 2026-11-05
|
|
4
|
+
|
|
5
|
+
- [2.34.1] Bug fix in `echarts-bar.js`
|
|
6
|
+
- [2.34.1] Bug fix in `echarts-pie.js`
|
|
7
|
+
|
|
3
8
|
## 2026-11-02
|
|
4
9
|
|
|
5
10
|
- [2.34.1] Bug fix in `echarts.js`
|
|
6
11
|
- [2.34.1] Bug fix in `echarts-bar.js`
|
|
7
12
|
- [2.34.1] Bug fix in `echarts-pie.js`
|
|
13
|
+
- [2.34.2] Bug fix in templates
|
|
14
|
+
- [2.34.2] Bug fix in `helper.addOnsHandler()`
|
|
15
|
+
- [2.34.2] Bug fix in `data-table.js` widget
|
|
8
16
|
|
|
9
17
|
## 2026-10-21
|
|
10
18
|
|