cloud-web-corejs 1.0.54-dev.509 → 1.0.54-dev.510

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.
@@ -72,6 +72,7 @@
72
72
  <script>
73
73
  import { selectDialogMixins } from "../../../../../mixins/selectDialog/index.js";
74
74
  import VFormRender from "../../../../../components/xform/form-render/index.vue";
75
+ import {traverseAllWidgetsNew} from "../../../../../components/xform/utils/util"
75
76
 
76
77
  export default {
77
78
  // name: "vabSearchDialog",
@@ -233,11 +234,22 @@ export default {
233
234
  },
234
235
  });
235
236
  },
237
+ getDataTableWidget(){
238
+ let result = null
239
+ traverseAllWidgetsNew(this.formJson.widgetList, (widget) => {
240
+ //修复data-table旧数据表格列widget与editWidget为空的问题
241
+ if (!result && widget.type == "data-table") {
242
+ result = widget
243
+ }
244
+ });
245
+ return result;
246
+ },
236
247
  getGrid() {
237
248
  if (!this.$grid) {
238
- let widgetList = this.formJson.widgetList;
249
+ // let widgetList = this.formJson.widgetList;
250
+ let dataTableWidget = this.getDataTableWidget();
239
251
  this.$grid = this.$refs.vFormRef
240
- .getWidgetRef(widgetList[0].options.name)
252
+ .getWidgetRef(dataTableWidget.options.name)
241
253
  .getGridTable();
242
254
  }
243
255
  return this.$grid;
@@ -245,8 +257,9 @@ export default {
245
257
  initShowFormField() {
246
258
  let showFormField = this.formJson.formConfig.searchDialogNameField || null;
247
259
  if (!showFormField) {
248
- let widgetList = this.formJson.widgetList;
249
- let tableColumns = widgetList[0].options.tableColumns;
260
+ // let widgetList = this.formJson.widgetList;
261
+ let dataTableWidget = this.getDataTableWidget();
262
+ let tableColumns = dataTableWidget.options.tableColumns;
250
263
  let column = tableColumns.find((column) => !!column.prop);
251
264
  this.showFormField = column.prop;
252
265
  } else {
@@ -313,6 +313,16 @@
313
313
  <i class="el-icon-edit"></i>
314
314
  </a>
315
315
  </el-form-item>
316
+ <el-form-item label="onFormBeforeMounted" label-width="150px">
317
+ <a
318
+ href="javascript:void(0);"
319
+ class="a-link link-oneLind"
320
+ @click="editFormEventHandler('onFormBeforeMounted')"
321
+ >
322
+ <span>{{ formConfig.onFormBeforeMounted }}</span>
323
+ <i class="el-icon-edit"></i>
324
+ </a>
325
+ </el-form-item>
316
326
  <el-form-item label="onFormMounted" label-width="150px">
317
327
  <a
318
328
  href="javascript:void(0);"
@@ -917,6 +927,7 @@ export default {
917
927
  eventParamsMap: {
918
928
  onBeforeCreated: "onBeforeCreated(dataId,formCode,done) {",
919
929
  onFormCreated: "onFormCreated(dataId,formCode) {",
930
+ onFormBeforeMounted: "onFormBeforeMounted(dataId,formCode, done) {",
920
931
  onFormMounted: "onFormMounted(dataId,formCode) {",
921
932
  onFormDataChange:
922
933
  "onFormDataChange(fieldName, newValue, oldValue, formModel, subFormName, subFormRowIndex) {",