@mixd-id/web-scaffold 0.1.2301231357 → 0.1.2301231359
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/utils/listpage1.js +5 -2
package/package.json
CHANGED
package/src/utils/listpage1.js
CHANGED
|
@@ -106,7 +106,7 @@ let ListPage1 = {
|
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
if(preset.search){
|
|
109
|
-
const tableName = this.model.
|
|
109
|
+
const tableName = this.model.name
|
|
110
110
|
where = {
|
|
111
111
|
...where,
|
|
112
112
|
[Op.and]: Sequelize.literal(`MATCH(\`${tableName}\`.tag) AGAINST (? IN BOOLEAN MODE)`)
|
|
@@ -236,7 +236,10 @@ let ListPage1 = {
|
|
|
236
236
|
|
|
237
237
|
switch(value.aggregrate){
|
|
238
238
|
case 'count':
|
|
239
|
-
|
|
239
|
+
const fn = columnValue === null ?
|
|
240
|
+
Sequelize.literal(`${colKey} is null`) :
|
|
241
|
+
Sequelize.literal(`${colKey} = '${columnValue}'`)
|
|
242
|
+
attributes.push([Sequelize.fn("SUM", Sequelize.fn("IF", fn, 1, 0)), colKey + "-" + columnValue])
|
|
240
243
|
summaryColumns.push({ key:colKey + "-" + columnValue, label:(columnValue ?? '').toString(), visible:true, aggregrate:"count" })
|
|
241
244
|
break
|
|
242
245
|
|