mooho-base-admin-plus 2.4.47 → 2.4.49

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mooho-base-admin-plus",
3
3
  "description": "MOOHO basic framework for admin by Vue3",
4
- "version": "2.4.47",
4
+ "version": "2.4.49",
5
5
  "author": "jinyifan <jinyifan@mooho.com.cn>",
6
6
  "license": "MIT",
7
7
  "private": false,
@@ -225,7 +225,7 @@
225
225
  this.loadDataEnable = false;
226
226
  }
227
227
 
228
- this.$refs.dialogTable.loadData();
228
+ //this.$refs.dialogTable.loadData();
229
229
 
230
230
  setTimeout(async () => {
231
231
  if (this.multi) {
@@ -737,6 +737,9 @@
737
737
  case 'Year':
738
738
  key = 'y_' + key; // 年
739
739
  break;
740
+ case 'DateRange':
741
+ key = key + '_c'; // 日期范围
742
+ return key;
740
743
  }
741
744
  //}
742
745
 
@@ -757,7 +760,7 @@
757
760
  key = key + '_n'; // 不等于
758
761
  break;
759
762
  case 'Contains':
760
- key = key + '_c'; // 模糊匹配
763
+ key = key + '_c'; // 文字包含
761
764
  break;
762
765
  }
763
766
 
@@ -732,7 +732,7 @@
732
732
  },
733
733
  // 获取数据源
734
734
  getDataSource(data, column) {
735
- if (!column.isStaticItem && column.dataType && column.dataType.startsWith('Enum:')) {
735
+ if (!column.isStaticItem && column.dataType.startsWith('Enum:')) {
736
736
  // 枚举
737
737
  return this.getEnumList(column.dataType.split(':')[1]);
738
738
  } else {
@@ -742,17 +742,22 @@
742
742
  // 数据变化事件
743
743
  async onDataChange(sender) {
744
744
  // 计算需要刷新的字段
745
- if (sender == null || sender.triggers !== []) {
745
+ if (sender == null || (sender.triggers && sender.triggers !== [])) {
746
746
  this.columns.forEach(function (column) {
747
747
  if (
748
+ !column.isStaticItem &&
748
749
  !!(column.source || '').trim() &&
749
750
  !(column.dataType && column.dataType.startsWith('Enum:')) &&
750
751
  (sender == null ||
751
752
  sender.triggers.some(item => {
752
- return item.id === column.id;
753
+ return item.code == column.code;
753
754
  }))
754
755
  ) {
755
756
  column.needRefresh = true;
757
+ // if (column.controlType == 'Table') {
758
+ // this.$refs['table_' + sender.code][0];
759
+ // } else {
760
+ // }
756
761
  }
757
762
  });
758
763
  }
@@ -2147,8 +2147,11 @@
2147
2147
 
2148
2148
  for (let key in filter) {
2149
2149
  if (this.isJSON(filter[key])) {
2150
- // 数组转换为逗号分隔的字符串
2150
+ // JSON数组,转换为逗号分隔的字符串
2151
2151
  filter[key] = JSON.parse(filter[key]).join(',');
2152
+ } else if (Object.prototype.toString.call(filter[key]) === '[object Array]') {
2153
+ // 数组转换为逗号分隔的字符串
2154
+ filter[key] = filter[key].join(',');
2152
2155
  } else if (typeof filter[key] == 'object' && !(filter[key] instanceof Date)) {
2153
2156
  delete filter[key];
2154
2157
  }
@@ -280,7 +280,6 @@
280
280
  document.addEventListener('scroll', this.handleScroll, { passive: true });
281
281
 
282
282
  // 非移动端,根据系统缩放比率调整界面大小
283
- //console.log('navigator.userAgent', navigator.userAgent);
284
283
  if (
285
284
  Setting.layout.autoFixRatio == true &&
286
285
  window.screen.width < 1920 &&
@@ -244,7 +244,6 @@ export default {
244
244
  // 设置侧边栏菜单
245
245
  const menuSiderList = getNativeMenuSider();
246
246
 
247
- //console.log('setMenuList', to, to.matched, to.matched.length);
248
247
  //let path = to.matched[to.matched.length - 1].path;
249
248
 
250
249
  //let headerName = getHeaderName(path, menuSiderList);