mooho-base-admin-plus 2.0.11 → 2.0.13
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/mooho-base-admin-plus.min.esm.js +117 -5
- package/package/mooho-base-admin-plus.min.js +45 -45
- package/package.json +1 -1
- package/src/components/view/column-edit.vue +18 -1
- package/src/components/view/filter-edit.vue +18 -1
- package/src/components/view/view-form.vue +1 -1
- package/src/components/view/view-table.vue +3 -3
package/package.json
CHANGED
|
@@ -327,7 +327,20 @@
|
|
|
327
327
|
</Col>
|
|
328
328
|
<Col v-bind="grid8">
|
|
329
329
|
<FormItem label="默认值" key="defaultValue" prop="defaultValue">
|
|
330
|
-
<Input type="text" v-model="data.defaultValue" maxlength="200" />
|
|
330
|
+
<Input type="text" v-model="data.defaultValue" maxlength="200" style="width: 150px" />
|
|
331
|
+
<Dropdown style="margin-left: 8px" @on-click="selectDefault">
|
|
332
|
+
<Button type="primary" size="small">
|
|
333
|
+
<Icon type="ios-arrow-down" />
|
|
334
|
+
</Button>
|
|
335
|
+
<template #list>
|
|
336
|
+
<DropdownMenu>
|
|
337
|
+
<DropdownItem name="today">当前日期</DropdownItem>
|
|
338
|
+
<DropdownItem name="today(yyyy-MM-dd)">格式化当前日期</DropdownItem>
|
|
339
|
+
<DropdownItem name="currentUser">当前用户ID</DropdownItem>
|
|
340
|
+
<DropdownItem name="currentUserName">当前用户姓名</DropdownItem>
|
|
341
|
+
</DropdownMenu>
|
|
342
|
+
</template>
|
|
343
|
+
</Dropdown>
|
|
331
344
|
</FormItem>
|
|
332
345
|
</Col>
|
|
333
346
|
<Col v-bind="grid8">
|
|
@@ -917,6 +930,10 @@
|
|
|
917
930
|
'type.code': '[' + this.data.dictTypeCode + ']',
|
|
918
931
|
isDisabled: '[false]'
|
|
919
932
|
});
|
|
933
|
+
},
|
|
934
|
+
// 选择默认值
|
|
935
|
+
async selectDefault(name) {
|
|
936
|
+
this.data.defaultValue = '{' + name + '}';
|
|
920
937
|
}
|
|
921
938
|
}
|
|
922
939
|
};
|
|
@@ -215,7 +215,20 @@
|
|
|
215
215
|
</Col>
|
|
216
216
|
<Col v-bind="grid8">
|
|
217
217
|
<FormItem label="默认值" key="defaultValue" prop="defaultValue">
|
|
218
|
-
<Input type="text" v-model="data.defaultValue" maxlength="200" />
|
|
218
|
+
<Input type="text" v-model="data.defaultValue" maxlength="200" style="width: 150px" />
|
|
219
|
+
<Dropdown style="margin-left: 8px" @on-click="selectDefault">
|
|
220
|
+
<Button type="primary" size="small">
|
|
221
|
+
<Icon type="ios-arrow-down" />
|
|
222
|
+
</Button>
|
|
223
|
+
<template #list>
|
|
224
|
+
<DropdownMenu>
|
|
225
|
+
<DropdownItem name="today">当前日期</DropdownItem>
|
|
226
|
+
<DropdownItem name="today(yyyy-MM-dd)">格式化当前日期</DropdownItem>
|
|
227
|
+
<DropdownItem name="currentUser">当前用户ID</DropdownItem>
|
|
228
|
+
<DropdownItem name="currentUserName">当前用户姓名</DropdownItem>
|
|
229
|
+
</DropdownMenu>
|
|
230
|
+
</template>
|
|
231
|
+
</Dropdown>
|
|
219
232
|
</FormItem>
|
|
220
233
|
</Col>
|
|
221
234
|
<Col v-bind="grid8">
|
|
@@ -701,6 +714,10 @@
|
|
|
701
714
|
'type.code': '[' + this.data.dictTypeCode + ']',
|
|
702
715
|
isDisabled: '[false]'
|
|
703
716
|
});
|
|
717
|
+
},
|
|
718
|
+
// 选择默认值
|
|
719
|
+
async selectDefault(name) {
|
|
720
|
+
this.data.defaultValue = '{' + name + '}';
|
|
704
721
|
}
|
|
705
722
|
}
|
|
706
723
|
};
|
|
@@ -1272,7 +1272,7 @@
|
|
|
1272
1272
|
if (!!(column.calculate || '').trim()) {
|
|
1273
1273
|
let calculate = column.calculate;
|
|
1274
1274
|
|
|
1275
|
-
// 计算sum、min、max等统计值
|
|
1275
|
+
// 计算sum、min、max、avg等统计值
|
|
1276
1276
|
calculate = this.calcStat('sum', calculate);
|
|
1277
1277
|
calculate = this.calcStat('min', calculate);
|
|
1278
1278
|
calculate = this.calcStat('max', calculate);
|
|
@@ -1833,6 +1833,9 @@
|
|
|
1833
1833
|
|
|
1834
1834
|
//this.$forceUpdate();
|
|
1835
1835
|
|
|
1836
|
+
// 公式计算
|
|
1837
|
+
this.calc(data, sender);
|
|
1838
|
+
|
|
1836
1839
|
/**
|
|
1837
1840
|
* 数据变化事件
|
|
1838
1841
|
* @property {object} data 行对象
|
|
@@ -1841,9 +1844,6 @@
|
|
|
1841
1844
|
*/
|
|
1842
1845
|
this.$emit('on-change', data, sender, selected);
|
|
1843
1846
|
|
|
1844
|
-
// 公式计算
|
|
1845
|
-
this.calc(data, sender);
|
|
1846
|
-
|
|
1847
1847
|
// 计算需要刷新的字段
|
|
1848
1848
|
if (sender == null || sender.triggers !== []) {
|
|
1849
1849
|
this.columns.forEach(function (column) {
|