mooho-base-admin-plus 2.7.1 → 2.7.5

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.7.1",
4
+ "version": "2.7.5",
5
5
  "author": "jinyifan <jinyifan@mooho.com.cn>",
6
6
  "license": "MIT",
7
7
  "private": false,
@@ -69,7 +69,7 @@
69
69
  <Divider :plain="true" dashed orientation="left" size="small">
70
70
  <span class="title">{{ getNameI18n(column) }}</span>
71
71
  </Divider>
72
- <view-table :ref="'list_' + column.code" :static="true" :view-code="column.source" :readonly="true" :embedded="true"></view-table>
72
+ <view-table :ref="'list_' + column.code" :view-code="column.source" :readonly="true" :auto-load="false"></view-table>
73
73
  </div>
74
74
  <FormItem
75
75
  :label="getNameI18n(column)"
@@ -1527,13 +1527,11 @@
1527
1527
  };
1528
1528
  }
1529
1529
 
1530
- if (column.isSourceCustom) {
1531
- res = await customModelApi.query(column.sourceModel, param);
1532
- } else {
1533
- res = await modelApi.query(column.sourceModel, param, tableView.functionName, tableView.functionType);
1530
+ for (let key in param) {
1531
+ this.$refs['list_' + column.code][0].filterData[key] = param[key];
1534
1532
  }
1535
1533
 
1536
- this.$refs['list_' + column.code][0].loadData(res.data);
1534
+ this.$refs['list_' + column.code][0].loadData();
1537
1535
  }
1538
1536
  }
1539
1537
  }
@@ -2207,11 +2207,13 @@
2207
2207
  onSelectAll(selection) {
2208
2208
  // 当页所有数据
2209
2209
  let allData = this.getDataWithChildren(this.data);
2210
- this.selectedData.length = 0;
2211
2210
 
2212
2211
  allData.forEach(item => {
2213
2212
  item._checked = true;
2214
- this.selectedData.push(item);
2213
+
2214
+ if (!this.selectedData.some(i => i.id == item.id)) {
2215
+ this.selectedData.push(item);
2216
+ }
2215
2217
  });
2216
2218
 
2217
2219
  /**
@@ -2225,9 +2227,12 @@
2225
2227
 
2226
2228
  allData.forEach(item => {
2227
2229
  item._checked = false;
2228
- });
2229
2230
 
2230
- this.selectedData.length = 0;
2231
+ if (this.selectedData.some(i => i.id == item.id)) {
2232
+ const index = this.selectedData.findIndex(i => i.id === item.id);
2233
+ this.selectedData.splice(index, 1);
2234
+ }
2235
+ });
2231
2236
 
2232
2237
  /**
2233
2238
  * 选中项变化事件
@@ -485,7 +485,7 @@ export default {
485
485
  let expression = '';
486
486
 
487
487
  for (let i = 0; i < text.length; i++) {
488
- if (
488
+ const operator =
489
489
  text[i] == ' ' ||
490
490
  text[i] == '+' ||
491
491
  text[i] == '-' ||
@@ -498,10 +498,10 @@ export default {
498
498
  text[i] == '!' ||
499
499
  text[i] == '|' ||
500
500
  text[i] == '&' ||
501
- text[i] == '=' ||
502
- i == text.length - 1
503
- ) {
504
- if (i == text.length - 1) {
501
+ text[i] == '=';
502
+
503
+ if (operator || i == text.length - 1) {
504
+ if (!operator) {
505
505
  expression += text[i];
506
506
  }
507
507
 
@@ -525,7 +525,7 @@ export default {
525
525
  expression = '';
526
526
  }
527
527
 
528
- if (i != text.length - 1) {
528
+ if (operator) {
529
529
  result += text[i];
530
530
  }
531
531
  } else {