cloud-web-corejs 1.0.54-dev.371 → 1.0.54-dev.372

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": "cloud-web-corejs",
3
3
  "private": false,
4
- "version": "1.0.54-dev.371",
4
+ "version": "1.0.54-dev.372",
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
7
7
  "lint": "eslint --ext .js,.vue src",
@@ -194,35 +194,43 @@ modules = {
194
194
  this.resetFilterEvent();
195
195
  return;
196
196
  }
197
+
197
198
  data.vals = vals;
198
199
  option.data.hasFilter = true;
199
200
  $panel.changeOption(evnt, true, option);
200
201
  $panel.confirmFilter();
201
202
 
202
- let checkStrictly = $table.$options.propsData?.checkboxConfig?.checkStrictly;
203
- $table.setAllCheckboxRow(false);
204
- // $table.clearCheckboxRow();
205
- // debugger
206
- // var originOption = $grid.originOption;
207
- /* if(checkStrictly){
208
-
209
- }else{
210
-
211
- } */
212
-
203
+ let checkStrictly =
204
+ $table.$options.propsData?.checkboxConfig?.checkStrictly;
205
+ // $table.setAllCheckboxRow(false);
206
+ this.clearTableCheckboxRow($table);
207
+ },
208
+ clearTableCheckboxRow($table) {
209
+ let originOption = $table.$xegrid?.originOption;
210
+ if (originOption) {
211
+ let target = originOption.vue;
212
+ if (
213
+ target.defaultTableRefName === originOption.tableRef &&
214
+ target._clearChecked
215
+ ) {
216
+ target._clearChecked();
217
+ } else {
218
+ $table.clearCheckboxRow();
219
+ }
220
+ originOption.onFilter && originOption.onFilter();
221
+ } else {
222
+ $table.clearCheckboxRow();
223
+ }
213
224
  },
214
225
  resetFilterEvent() {
215
226
  const { $panel, $table } = this.params;
216
- let checkStrictly = $table.$options.propsData?.checkboxConfig?.checkStrictly;
227
+ let checkStrictly =
228
+ $table.$options.propsData?.checkboxConfig?.checkStrictly;
217
229
  this.option.data.hasFilter = false;
218
230
  $panel.resetFilter();
219
- $table.setAllCheckboxRow(false);
220
- // $table.clearCheckboxRow();
221
- /* if(checkStrictly){
222
-
223
- }else{
231
+ // $table.setAllCheckboxRow(false);
224
232
 
225
- } */
233
+ this.clearTableCheckboxRow($table);
226
234
  },
227
235
  },
228
236
  },
@@ -113,6 +113,11 @@ export default {
113
113
  onCellDblclick: (param) => {
114
114
  this.checkWithSubmit(param);
115
115
  },
116
+ otherConfig: {
117
+ onFilter: () => {
118
+ this.checkRows = [];
119
+ },
120
+ },
116
121
  config: {
117
122
  checkboxConfig: {
118
123
  checkStrictly: true,
@@ -1051,6 +1051,7 @@ modules = {
1051
1051
  searchColumns: searchColumns,
1052
1052
  isQueryAllPage,
1053
1053
  vform: true,
1054
+ ...(dataTableConfig.otherConfig || {}),
1054
1055
  config: {
1055
1056
  height: height,
1056
1057
  showFooter,
@@ -12,7 +12,8 @@ tMixins = {
12
12
  data() {
13
13
  return {
14
14
  checkRows: [],
15
- fieldKey: 'id'
15
+ fieldKey: 'id',
16
+ defaultTableRefName: "table-m1"
16
17
  }
17
18
  },
18
19
  methods: {
@@ -31,6 +32,10 @@ tMixins = {
31
32
  if (this.$attrs.fieldKey) {
32
33
  this.fieldKey = this.$attrs.fieldKey;
33
34
  }
35
+
36
+ if (this.$attrs.tableRef) {
37
+ this.defaultTableRefName = this.$attrs.tableRef;
38
+ }
34
39
  let checkRows;
35
40
  if (this.selectMulti) {
36
41
  checkRows = this.rows || [];
@@ -48,13 +53,11 @@ tMixins = {
48
53
  }
49
54
  },
50
55
  addDataTable(obj) {
51
- debugger
52
56
  let fieldKey = this.fieldKey;
53
57
  let selectMulti = this.selectMulti;
54
58
  let row = obj.row;
55
59
  let that = this;
56
60
  let $table1 = obj.$table;
57
- let $table2 = this.$refs['table-m2'];
58
61
 
59
62
  if (selectMulti) {
60
63
  let rows = this.checkRows;
@@ -108,7 +111,7 @@ tMixins = {
108
111
  let selectMulti = this.selectMulti;
109
112
  let row = this.checkRows[index];
110
113
  var rowid = row[fieldKey];
111
- let $grid1 = this.$refs['table-m1'];
114
+ let $grid1 = this.$refs[this.defaultTableRefName];
112
115
 
113
116
  // let rows = $grid1.getTableData().fullData;
114
117
  let rows = $grid1.getTableData().visibleData;
@@ -162,10 +165,13 @@ tMixins = {
162
165
  })
163
166
  },
164
167
  clearChecked() {
165
- let $grid1 = this.$refs['table-m1'];
168
+ let $grid1 = this.$refs[this.defaultTableRefName];
166
169
  $grid1.clearCheckboxRow();
167
170
  this.checkRows = [];
168
171
  },
172
+ _clearChecked() {
173
+ this.clearChecked();
174
+ },
169
175
  findTreeRowById(rows, rowid) {
170
176
  let fieldKey = this.fieldKey;
171
177
  for (let i = 0; i < rows.length; i++) {
@@ -197,7 +203,7 @@ tMixins = {
197
203
  return newRows;
198
204
  },
199
205
  searchEvent(option) {
200
- let target = "table-m1";
206
+ let target = this.defaultTableRefName;
201
207
  let formKey = "formData";
202
208
  if (option && !option.preventDefault) {
203
209
  if (option.target) {
@@ -210,7 +216,7 @@ tMixins = {
210
216
  this.$refs[target].commitProxy('reload');
211
217
  },
212
218
  resetEvent(option) {
213
- let target = "table-m1";
219
+ let target = this.defaultTableRefName;
214
220
  let formKey = "formData";
215
221
  if (option && !option.preventDefault) {
216
222
  if (option.target) {
@@ -118,6 +118,7 @@
118
118
  :visiable.sync="showUserDialog1"
119
119
  @confirm="confirmUserDialog1"
120
120
  :multi="false"
121
+ :param="{ enabled: null }"
121
122
  />
122
123
  <userDialog
123
124
  v-if="showUserDialog2"
@@ -112,6 +112,7 @@
112
112
  :visiable.sync="showUserDialog1"
113
113
  @confirm="confirmUserDialog1"
114
114
  :multi="false"
115
+ :param="{ enabled: null }"
115
116
  />
116
117
  <userDialog
117
118
  v-if="showUserDialog2"