cloud-web-corejs 1.0.54-dev.369 → 1.0.54-dev.370

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.369",
4
+ "version": "1.0.54-dev.370",
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
7
7
  "lint": "eslint --ext .js,.vue src",
@@ -6,12 +6,24 @@
6
6
  v-bind="dialogConfig"
7
7
  @close="close"
8
8
  >
9
- <div class="cont" style="height:450px" v-bind="bodyConfig">
10
- <v-form-render :form-json.sync="formJson" :form-data="formData" :option-data="optionData" ref="vFormRef"
11
- :reportTemplate.sync="formTemplate" :conditionParam.sync="conditionParam"
12
- :formInsData.sync="formInsData" v-if="showRender" visible-key="showRender" :parent-target="_self"
13
- @reload="reload" :dataTableOption="dataTableOption" v-bind="formConfig" :param="dialogParam"
14
- class="data-table_height"/>
9
+ <div class="cont" style="height: 450px" v-bind="bodyConfig">
10
+ <v-form-render
11
+ :form-json.sync="formJson"
12
+ :form-data="formData"
13
+ :option-data="optionData"
14
+ ref="vFormRef"
15
+ :reportTemplate.sync="formTemplate"
16
+ :conditionParam.sync="conditionParam"
17
+ :formInsData.sync="formInsData"
18
+ v-if="showRender"
19
+ visible-key="showRender"
20
+ :parent-target="_self"
21
+ @reload="reload"
22
+ :dataTableOption="dataTableOption"
23
+ v-bind="formConfig"
24
+ :param="dialogParam"
25
+ class="data-table_height"
26
+ />
15
27
  </div>
16
28
  <label id="labBtn" class="transverse">
17
29
  <div class="icon">
@@ -20,46 +32,54 @@
20
32
  </div>
21
33
  </label>
22
34
  <div class="multipleChoice">
23
- <el-tooltip :enterable="false" effect="dark" :content="$t1('全部删除')" placement="top"><a
24
- class="allDel icon-quanbushanchu"
25
- @click="clearChecked()"></a>
35
+ <el-tooltip
36
+ :enterable="false"
37
+ effect="dark"
38
+ :content="$t1('全部删除')"
39
+ placement="top"
40
+ ><a class="allDel icon-quanbushanchu" @click="clearChecked()"></a>
26
41
  </el-tooltip>
27
42
  <div class="list">
28
43
  <template v-if="showRender">
29
- <div class="item" v-for="(checkRow, index) in checkRows" :key="'c'+index">
44
+ <div class="item" v-for="(checkRow, index) in checkRows" :key="'c' + index">
30
45
  <p>{{ checkRow[showFormField] }}</p>
31
46
  <a class="el-icon-close" @click="clearTable1Select(index)"></a>
32
47
  </div>
33
48
  </template>
34
49
  </div>
35
50
  </div>
36
- <span slot="footer" class="dialog-footer" v-if="option.showFooter!==false" v-bind="option.footerConfig">
37
- <span class="fl tips" v-if="!selectMulti">{{ $t1('注:双击确认选择(单选)') }}</span>
38
- <el-button type="primary" plain class="button-sty" @click="close">
39
- <i class="el-icon-close el-icon"></i>
40
- {{ $t1('取 消') }}
41
- </el-button>
42
- <el-button type="primary" @click="dialogSubmit" class="button-sty">
43
- <i class="el-icon-check el-icon"></i>
44
- {{ $t1('确 定') }}
45
- </el-button>
46
- </span>
51
+ <span
52
+ slot="footer"
53
+ class="dialog-footer"
54
+ v-if="option.showFooter !== false"
55
+ v-bind="option.footerConfig"
56
+ >
57
+ <span class="fl tips" v-if="!selectMulti">{{
58
+ $t1("注:双击确认选择(单选)")
59
+ }}</span>
60
+ <el-button type="primary" plain class="button-sty" @click="close">
61
+ <i class="el-icon-close el-icon"></i>
62
+ {{ $t1("取 消") }}
63
+ </el-button>
64
+ <el-button type="primary" @click="dialogSubmit" class="button-sty">
65
+ <i class="el-icon-check el-icon"></i>
66
+ {{ $t1("确 定") }}
67
+ </el-button>
68
+ </span>
47
69
  </el-dialog>
48
70
  </template>
49
71
 
50
72
  <script>
51
- import {selectDialogMixins} from '../../../../../mixins/selectDialog/index.js';
73
+ import { selectDialogMixins } from "../../../../../mixins/selectDialog/index.js";
52
74
  import VFormRender from "../../../../../components/xform/form-render/index.vue";
53
75
 
54
76
  export default {
55
77
  // name: "vabSearchDialog",
56
- components: {VFormRender},
57
- props: ['visiable', 'multi', 'rows', 'param', 'widget', 'option'],
78
+ components: { VFormRender },
79
+ props: ["visiable", "multi", "rows", "param", "widget", "option"],
58
80
  mixins: [selectDialogMixins],
59
81
  inject: ["getFormConfig"],
60
- mounted() {
61
-
62
- },
82
+ mounted() {},
63
83
  data() {
64
84
  var that = this;
65
85
  return {
@@ -97,12 +117,12 @@ export default {
97
117
  checkboxConfig: {
98
118
  checkStrictly: true,
99
119
  showHeader: true,
100
- trigger: 'row'
101
- }
102
- }
120
+ trigger: "row",
121
+ },
122
+ },
103
123
  },
104
124
  $grid: null,
105
- currentLayoutType: null
125
+ currentLayoutType: null,
106
126
  };
107
127
  },
108
128
  computed: {
@@ -118,7 +138,7 @@ export default {
118
138
  dialogConfig() {
119
139
  let customClass = "dialog-style list-dialog dialog-checkbox pd_0";
120
140
  if (this.option.dialogConfig?.customClass) {
121
- customClass = customClass + " " + this.option.dialogConfig.customClass
141
+ customClass = customClass + " " + this.option.dialogConfig.customClass;
122
142
  }
123
143
  let config = {
124
144
  title: this.formTemplate.formName,
@@ -129,41 +149,41 @@ export default {
129
149
  width: "1200px",
130
150
  fullscreen: this.option.fullscreen,
131
151
  };
132
- config = Object.assign({}, config, this.option.dialogConfig, {customClass});
152
+ config = Object.assign({}, config, this.option.dialogConfig, { customClass });
133
153
  config.title = this.$t1(config.title);
134
154
  return config;
135
155
  },
136
156
  bodyConfig() {
137
157
  let config = {};
138
- let classStr = this.currentLayoutType
158
+ let classStr = this.currentLayoutType;
139
159
  if (this.option.bodyConfig?.class) {
140
160
  classStr = classStr + " " + this.option.bodyConfig.class;
141
161
  }
142
162
  if (this.option.showFooter == false) {
143
163
  classStr = classStr + " nfootBtn";
144
164
  }
145
- config = Object.assign({}, config, this.option.bodyConfig, {class: classStr});
165
+ config = Object.assign({}, config, this.option.bodyConfig, { class: classStr });
146
166
  return config;
147
- }
167
+ },
148
168
  },
149
169
  created() {
150
170
  let currentFormConfig = this.getFormConfig();
151
- this.currentLayoutType = currentFormConfig.layoutType
171
+ this.currentLayoutType = currentFormConfig.layoutType;
152
172
  this.initSetting();
153
173
 
154
174
  if (this.option.rows?.length) {
155
- this.checkRows.push(...this.$baseLodash.cloneDeep(this.option.rows))
175
+ this.checkRows.push(...this.$baseLodash.cloneDeep(this.option.rows));
156
176
  }
157
177
 
158
178
  this.selectMulti = this.option.multiple ?? true;
159
179
  this.dataTableOption.config.checkboxConfig.showHeader = this.selectMulti;
160
- if(this.option.queryParam){
180
+ if (this.option.queryParam) {
161
181
  this.dataTableOption.queryParam = this.option.queryParam;
162
182
  }
163
183
  this.getReportTemplate();
164
184
  },
165
185
  methods: {
166
- reload(){
186
+ reload() {
167
187
  this.showRender = false;
168
188
  this.getReportTemplate();
169
189
  },
@@ -171,12 +191,12 @@ export default {
171
191
  let param = {
172
192
  objTypeCode: this.$attrs.objTypeCode,
173
193
  objId: this.$attrs.objId,
174
- taskId: this.$attrs.taskId
194
+ taskId: this.$attrs.taskId,
175
195
  };
176
196
  this.conditionParam = param;
177
197
  let url, data;
178
198
  url = USER_PREFIX + `/formTemplate/getByFormCode`;
179
- data = {stringOne: this.formCode}
199
+ data = { stringOne: this.formCode };
180
200
 
181
201
  let that = this;
182
202
  this.$http({
@@ -186,11 +206,13 @@ export default {
186
206
  isLoading: true,
187
207
  loadingTarget: document.body,
188
208
  modalStrictly: true,
189
- success: res => {
209
+ success: (res) => {
190
210
  let formTemplate = res.objx || {};
191
211
  this.formTemplate = formTemplate;
192
- this.formJson = formTemplate.formViewContent ? JSON.parse(formTemplate.formViewContent) : {};
193
- this.layoutType = this.formJson.formConfig.layoutType
212
+ this.formJson = formTemplate.formViewContent
213
+ ? JSON.parse(formTemplate.formViewContent)
214
+ : {};
215
+ this.layoutType = this.formJson.formConfig.layoutType;
194
216
  let formConfig = this.formJson.formConfig;
195
217
  if (formConfig.searchDialogUniqueField) {
196
218
  this.fieldKey = formConfig.searchDialogUniqueField;
@@ -203,27 +225,27 @@ export default {
203
225
  })*/
204
226
  this.initShowFormField();
205
227
  this.showRender = true;
206
-
207
-
208
- }
228
+ },
209
229
  });
210
230
  },
211
- getGrid(){
212
- if(!this.$grid){
231
+ getGrid() {
232
+ if (!this.$grid) {
213
233
  let widgetList = this.formJson.widgetList;
214
- this.$grid = this.$refs.vFormRef.getWidgetRef(widgetList[0].options.name).getGridTable();
234
+ this.$grid = this.$refs.vFormRef
235
+ .getWidgetRef(widgetList[0].options.name)
236
+ .getGridTable();
215
237
  }
216
238
  return this.$grid;
217
239
  },
218
240
  initShowFormField() {
219
241
  let showFormField = this.formJson.formConfig.searchDialogNameField || null;
220
242
  if (!showFormField) {
221
- let widgetList = this.formJson.widgetList
243
+ let widgetList = this.formJson.widgetList;
222
244
  let tableColumns = widgetList[0].options.tableColumns;
223
- let column = tableColumns.find(column => !!column.prop);
245
+ let column = tableColumns.find((column) => !!column.prop);
224
246
  this.showFormField = column.prop;
225
- }else{
226
- this.showFormField = showFormField
247
+ } else {
248
+ this.showFormField = showFormField;
227
249
  }
228
250
  },
229
251
  async getFormInsData() {
@@ -236,17 +258,17 @@ export default {
236
258
  method: `post`,
237
259
  data: {
238
260
  insUuid: insUuid,
239
- tableAlias: this.formCode
261
+ tableAlias: this.formCode,
240
262
  },
241
263
  isLoading: true,
242
264
  loadingTarget: document.body,
243
265
  modalStrictly: true,
244
- success: res => {
266
+ success: (res) => {
245
267
  let formData = res.objx && res.objx.data ? res.objx.data : {};
246
268
  this.formData = formData;
247
269
  this.formInsData = res.objx;
248
270
  // this.formInsData = formData;
249
- }
271
+ },
250
272
  });
251
273
  },
252
274
  changeH5Checkbox(obj) {
@@ -257,7 +279,7 @@ export default {
257
279
  if (selectMulti) {
258
280
  let rows = this.checkRows;
259
281
  if (obj.checked) {
260
- let flag = rows.some(item => {
282
+ let flag = rows.some((item) => {
261
283
  return row[fieldKey] == item[fieldKey];
262
284
  });
263
285
  if (!flag) {
@@ -288,7 +310,7 @@ export default {
288
310
  if (selectMulti) {
289
311
  let rows = this.checkRows;
290
312
  if (obj.checked) {
291
- let flag = rows.some(item => {
313
+ let flag = rows.some((item) => {
292
314
  return row[fieldKey] == item[fieldKey];
293
315
  });
294
316
  if (!flag) {
@@ -313,8 +335,9 @@ export default {
313
335
  }
314
336
 
315
337
  if (obj.checked) {
316
- let ay = $table1.getTableData().fullData;
317
- let aRows = this.findAllRows(ay);
338
+ // let ay = $table1.getTableData().fullData;
339
+ // let aRows = this.findAllRows(ay);
340
+ let aRows = $table1.getTableData().visibleData;
318
341
  let cRows = $table1.getCheckboxRecords();
319
342
  if (aRows.length == cRows.length) {
320
343
  $table1.setAllCheckboxRow(true);
@@ -335,7 +358,8 @@ export default {
335
358
  var rowid = row[fieldKey];
336
359
  let $grid1 = this.getGrid();
337
360
 
338
- let rows = $grid1.getTableData().fullData;
361
+ // let rows = $grid1.getTableData().fullData;
362
+ let rows = $grid1.getTableData().visibleData;
339
363
  let row2 = this.findTreeRowById(rows, rowid);
340
364
  if (selectMulti) {
341
365
  if (row2) $grid1.setCheckboxRow(row2, false);
@@ -350,10 +374,12 @@ export default {
350
374
  if (this.currentLayoutType !== "H5") {
351
375
  let fieldKey = this.fieldKey;
352
376
  var $grid = res.$grid;
353
- let tableData = $grid.getTableData().fullData;
354
- let allRows = this.findAllRows(tableData);
377
+ // let tableData = $grid.getTableData().fullData;
378
+ // let allRows = this.findAllRows(tableData);
379
+ let tableData = $grid.getTableData().visibleData;
380
+ let allRows = $grid.getTableData().visibleData;
355
381
  $grid.setCheckboxRow(allRows, res.checked);
356
- allRows.forEach(lineData => {
382
+ allRows.forEach((lineData) => {
357
383
  let rowid = lineData[fieldKey];
358
384
  let tableData2 = this.checkRows;
359
385
  let row2;
@@ -380,7 +406,7 @@ export default {
380
406
  if (delIndex != null) checkRows.splice(delIndex, 1);
381
407
  }
382
408
  }
383
- })
409
+ });
384
410
  }
385
411
  },
386
412
  clearChecked() {
@@ -402,7 +428,7 @@ export default {
402
428
  close() {
403
429
  let formRef = this.$refs.vFormRef;
404
430
  this.showDialog = false;
405
- this.$emit('update:visiable', false);
431
+ this.$emit("update:visiable", false);
406
432
  this.option.close && this.option.close(formRef, this);
407
433
  },
408
434
  dialogSubmit() {
@@ -414,11 +440,9 @@ export default {
414
440
  } else {
415
441
  this.close();
416
442
  }
417
- }
418
-
419
-
420
- }
421
- }
443
+ },
444
+ },
445
+ };
422
446
  </script>
423
447
 
424
448
  <style scoped>