agilebuilder-ui 1.0.90-tmp2 → 1.0.90-tmp20

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/lib/super-ui.js CHANGED
@@ -9230,7 +9230,8 @@ const en = {
9230
9230
  forbiddenExceptionLinkUrl: "please click to apply",
9231
9231
  forbiddenExceptionLinkUser: "if you have any questions,please contact",
9232
9232
  uploadFileTip: "The file size should lower {fileSize}M",
9233
- asyncExportJumpMsg: "Or click me to jump to download page."
9233
+ asyncExportJumpMsg: "Or click me to jump to download page.",
9234
+ mustFill: "{label} must fill"
9234
9235
  },
9235
9236
  superGrid: {
9236
9237
  columnConfig: "Column Config",
@@ -9512,7 +9513,8 @@ const en = {
9512
9513
  forbiddenExceptionLinkUrl: "请点击进行权限申请",
9513
9514
  forbiddenExceptionLinkUser: "如有疑问请联系",
9514
9515
  uploadFileTip: "上传的文件不超过{fileSize}M",
9515
- asyncExportJumpMsg: "或点击我跳转到下载页面"
9516
+ asyncExportJumpMsg: "或点击我跳转到下载页面",
9517
+ mustFill: "{label} 必须填写"
9516
9518
  },
9517
9519
  // 列表组件
9518
9520
  superGrid: {
@@ -15509,8 +15511,8 @@ function isDisableEdit(e, t, n) {
15509
15511
  const _ = l.options.actionPermission;
15510
15512
  isRowCanUpdate(_, d) === !1 && (o = !0);
15511
15513
  }
15512
- if (o === !1 && l.options.customRules && l.options.customRules[e]) {
15513
- const _ = l.options.customRules[e];
15514
+ if (o === !1 && l.options.customRules && (l.options.customRules[e] || l.options.customRules._all_fields)) {
15515
+ const _ = l.options.customRules[e] ? l.options.customRules[e] : l.options.customRules._all_fields;
15514
15516
  _ && _.disabled && (o = !0);
15515
15517
  }
15516
15518
  }
@@ -16508,23 +16510,49 @@ function getEndObjectRule(e, t, n) {
16508
16510
  }
16509
16511
  function getValidator(e) {
16510
16512
  e || (e = store$1.get("_list_code"));
16511
- const n = store$1.get(e).columns, o = {};
16512
- return n && n.forEach((l) => {
16513
- setRules(o, l, e);
16514
- }), o;
16513
+ const t = store$1.get(e), n = t.columns, o = t.options.customRules, l = {};
16514
+ return n && n.forEach((u) => {
16515
+ setRules(l, u, e, o);
16516
+ }), l;
16515
16517
  }
16516
- function setRules(e, t, n) {
16517
- const o = t.prop;
16518
+ function setRules(e, t, n, o) {
16519
+ const l = t.prop;
16518
16520
  if (t.groupHeader && t.children && t.children.length > 0)
16519
- t.children.forEach((l) => {
16520
- setRules(e, l, n);
16521
+ t.children.forEach((u) => {
16522
+ setRules(e, u, n, o);
16523
+ });
16524
+ else if (l) {
16525
+ const u = getColumnCustomRules(t, o);
16526
+ if ((u || t.validations) && !isDisableEdit(l, n)) {
16527
+ let d = t.validations ? JSON.parse(t.validations) : [];
16528
+ d.forEach((v) => {
16529
+ v.pattern && (v.pattern = new RegExp(v.pattern));
16530
+ }), d = d.concat(u), l.indexOf(".") > 0 ? setObjectPropRule(t, e, d) : d && d.length > 0 && (e[l] = [...d]);
16531
+ }
16532
+ }
16533
+ }
16534
+ function getColumnCustomRules(e, t) {
16535
+ const n = e.prop;
16536
+ let o = [], l;
16537
+ const u = "_all_fields";
16538
+ let d;
16539
+ if (t && (d = t[n] ? t[n] : t[u]), d && (d.required || d.rules)) {
16540
+ const v = getI18n().t("imatrixUIMessage.mustFill", {
16541
+ label: e.label
16521
16542
  });
16522
- else if (o && t.validations && !isDisableEdit(o, n)) {
16523
- const l = JSON.parse(t.validations);
16524
- l.forEach((u) => {
16525
- u.pattern && (u.pattern = new RegExp(u.pattern));
16526
- }), o.indexOf(".") > 0 ? setObjectPropRule(t, e, l) : l && l.length > 0 && (e[o] = [...l]);
16543
+ if (o = d.rules ? JSON.parse(JSON.stringify(d.rules)) : null, o && o.length > 0) {
16544
+ const _ = o.filter((E) => E.required);
16545
+ _ && _.length > 0 && (l = _[0]);
16546
+ }
16547
+ d.name === u && o && o.forEach((_) => {
16548
+ _.message = e.label + _.message;
16549
+ }), !l && d.required && (o || (o = []), l = {
16550
+ required: !0,
16551
+ message: v,
16552
+ trigger: "blur"
16553
+ }, o.push(l)), l && !l.message && (l.message = v);
16527
16554
  }
16555
+ return o;
16528
16556
  }
16529
16557
  function validator(e, t, n, o, l, u, d) {
16530
16558
  return validatorEntity(e, t, n, o, !0, l, u, d);
@@ -17680,15 +17708,27 @@ const apis$2 = {
17680
17708
  }
17681
17709
  ]
17682
17710
  */
17683
- dynamicControlTableEdit(e, t) {
17684
- if (console.log("dynamicControlTableEdit----customRules-----", t), !t)
17711
+ dynamicControlTableEdit(e, t, n) {
17712
+ const o = store$1.get(n);
17713
+ if (!t)
17685
17714
  return;
17686
- let n = {};
17687
- this.options.customRules && (n = JSON.parse(JSON.stringify(this.options.customRules))), t.forEach((o) => {
17688
- const l = JSON.parse(JSON.stringify(o)), u = o.name;
17689
- let d;
17690
- n[u] ? d = n[u].rules : n[u] = {}, l.rules && (d || (d = []), d = d.concat(l.rules)), l.rules = d, this.options.customRules[u] = l;
17691
- }), console.log("dynamicControlTableEdit----this.options-----", this.options);
17715
+ let l = {};
17716
+ o.options.customRules && (l = JSON.parse(JSON.stringify(o.options.customRules))), t.forEach((u) => {
17717
+ const d = JSON.parse(JSON.stringify(u)), v = u.name;
17718
+ let _;
17719
+ l[v] || (l[v] = {}), _ = l[v].rules, d.rules && (_ || (_ = []), _ = _.concat(d.rules)), d.rules = _, o.options.customRules || (o.options.customRules = {}), o.options.customRules[v] = d;
17720
+ });
17721
+ },
17722
+ doLayout(e, t) {
17723
+ if (e && e.length > 0)
17724
+ this.options.hiddenColumns || (this.options.hiddenColumns = []), (this.options.hiddenColumns.length = 0) ? this.options.hiddenColumns = e : e.forEach((n) => {
17725
+ this.options.hiddenColumns.indexOf(n) < 0 && this.options.hiddenColumns.push(n);
17726
+ });
17727
+ else {
17728
+ const n = store$1.get(t);
17729
+ this.options.hiddenColumns = n.options.hiddenColumns;
17730
+ }
17731
+ this.$refs && this.$refs.superGrid && this.$refs.superGrid.doLayout();
17692
17732
  }
17693
17733
  }, _sfc_main$1n = {
17694
17734
  components: {
@@ -18137,19 +18177,19 @@ const _sfc_main$1m = {
18137
18177
  const t = JSON.parse(this.column.orgTreeSet);
18138
18178
  this.type.indexOf("DeptTree") > 0 && t.checkStrictly && (this.isCheckStrictly = t.checkStrictly), t.length ? this.fields = t : t.orgTreeSetArr && (this.fields = t.orgTreeSetArr);
18139
18179
  }
18140
- this.getDateAllowTime(), this.gridOptions.customRules || (this.gridOptions.customRules = {}), this.watch(
18180
+ this.getDateAllowTime(), this.gridOptions.customRules || (this.gridOptions.customRules = {}), this.$watch(
18141
18181
  "gridOptions.customRules." + this.column.prop,
18142
18182
  (t, n) => {
18143
- this.packageCustomRules();
18183
+ this.packageCustomRules(t);
18144
18184
  },
18145
18185
  {
18146
18186
  immediate: !0,
18147
18187
  deep: !0
18148
18188
  }
18149
- ), this.watch(
18189
+ ), this.$watch(
18150
18190
  "gridOptions.customRules._all_fields",
18151
18191
  (t, n) => {
18152
- this.packageCustomRules();
18192
+ this.packageCustomRules(t);
18153
18193
  },
18154
18194
  {
18155
18195
  immediate: !0,
@@ -18700,15 +18740,8 @@ const _sfc_main$1m = {
18700
18740
  closeBrowserScan(e) {
18701
18741
  this.isShowBrowserScan = !1, this.innerValue = e, this.blurEvent();
18702
18742
  },
18703
- packageCustomRules() {
18704
- if (!this.options.customRules)
18705
- return;
18706
- const e = this.options.customRules.filter((t) => t.name === this.column.prop || t.name === "_all_fields");
18707
- if (e && e.length > 0)
18708
- for (let t = 0; t < e.length; t++) {
18709
- const n = e[t];
18710
- n.disabled !== void 0 && this.$emit("change-disabled", n.disabled), n.required !== void 0 && this.$emit("change-required", n.required);
18711
- }
18743
+ packageCustomRules(e) {
18744
+ console.log("packageCustomRules---columnRule=", e), e && (e.disabled !== void 0 && this.$emit("change-disabled", e.disabled), e.required !== void 0 && this.$emit("change-required", e.required));
18712
18745
  }
18713
18746
  }
18714
18747
  };
@@ -20713,7 +20746,7 @@ function _sfc_render$W(e, t, n, o, l, u) {
20713
20746
  ], 4))
20714
20747
  ]);
20715
20748
  }
20716
- const GridIcon = /* @__PURE__ */ _export_sfc$1(_sfc_main$1i, [["render", _sfc_render$W]]), normalColumnContent_vue_vue_type_style_index_0_scoped_cde78d9b_lang = "", _sfc_main$1h = {
20749
+ const GridIcon = /* @__PURE__ */ _export_sfc$1(_sfc_main$1i, [["render", _sfc_render$W]]), normalColumnContent_vue_vue_type_style_index_0_scoped_bdebf40d_lang = "", _sfc_main$1h = {
20717
20750
  components: {
20718
20751
  DynamicInput,
20719
20752
  RowOperation,
@@ -20792,24 +20825,20 @@ const GridIcon = /* @__PURE__ */ _export_sfc$1(_sfc_main$1i, [["render", _sfc_re
20792
20825
  isShowForm: {
20793
20826
  type: Boolean,
20794
20827
  default: !1
20795
- },
20796
- // 列表配置信息
20797
- options: {
20798
- type: Object,
20799
- default: null
20800
20828
  }
20801
20829
  },
20802
20830
  data() {
20803
20831
  let e;
20804
- const t = store$1.get(this.listCode);
20832
+ const t = store$1.get(this.listCode), n = t.options;
20805
20833
  t.options.extraParam && t.options.extraParam.entityMap && (e = t.options.extraParam.entityMap);
20806
- const n = getAdditionalParamMap(t);
20807
- let o = {};
20808
- this.column.controlConfig && (o = JSON.parse(this.column.controlConfig));
20809
- let l = !1;
20810
- o.scanEnable && (l = !0);
20811
- const u = this.listCode + "_" + this.column.prop, d = this.isRequired(this.row.$editing) ? "m-requried" : "";
20812
- return {
20834
+ const o = getAdditionalParamMap(t);
20835
+ let l = {};
20836
+ this.column.controlConfig && (l = JSON.parse(this.column.controlConfig));
20837
+ let u = !1;
20838
+ l.scanEnable && (u = !0);
20839
+ const d = this.listCode + "_" + this.column.prop;
20840
+ let v;
20841
+ return t.lineEdit !== null && t.lineEdit !== void 0 && (v = t.lineEdit), {
20813
20842
  selectRow: null,
20814
20843
  that: this,
20815
20844
  align: "left",
@@ -20837,25 +20866,31 @@ const GridIcon = /* @__PURE__ */ _export_sfc$1(_sfc_main$1i, [["render", _sfc_re
20837
20866
  showRichEditorViewer: !1,
20838
20867
  getFormData: t.options.getFormData,
20839
20868
  getTableGridData: t.options.getGridData,
20840
- additionalParamMap: n,
20869
+ additionalParamMap: o,
20841
20870
  disabled: !1,
20842
20871
  additionalSettings: this.getColumnCustomControlControlConfig(this.column.formatter),
20843
- scanEnable: l,
20844
- componentId: u,
20845
- controlConfig: o,
20872
+ scanEnable: u,
20873
+ componentId: d,
20874
+ controlConfig: l,
20846
20875
  rowLinkConfigMapping: {},
20847
- requiredClass: d
20876
+ requiredClass: "",
20877
+ lineEdit: v,
20878
+ options: n
20848
20879
  };
20849
20880
  },
20850
20881
  computed: {
20851
- lineEdit() {
20852
- let e = !1;
20853
- if (this.listCode) {
20854
- const t = store$1.get(this.listCode);
20855
- t.lineEdit !== null && t.lineEdit !== void 0 ? e = t.lineEdit : e = !1;
20856
- }
20857
- return e;
20858
- },
20882
+ // lineEdit() {
20883
+ // let isLineEdit = false
20884
+ // if (this.listCode) {
20885
+ // const gridParams = store.get(this.listCode)
20886
+ // if (gridParams.lineEdit !== null && gridParams.lineEdit !== undefined) {
20887
+ // isLineEdit = gridParams.lineEdit
20888
+ // } else {
20889
+ // isLineEdit = false
20890
+ // }
20891
+ // }
20892
+ // return isLineEdit
20893
+ // },
20859
20894
  ...mapGetters(["preventReclick"])
20860
20895
  },
20861
20896
  watch: {
@@ -20881,7 +20916,7 @@ const GridIcon = /* @__PURE__ */ _export_sfc$1(_sfc_main$1i, [["render", _sfc_re
20881
20916
  const o = JSON.parse(this.column.fileSet);
20882
20917
  o && o.multiple && (this.fileMultiple = !0);
20883
20918
  }
20884
- this.setScanRuleSets();
20919
+ this.setScanRuleSets(), this.requiredClass = this.isRequired(this.row.$editing) ? "m-requried" : "";
20885
20920
  },
20886
20921
  mounted() {
20887
20922
  $on(bus, "un-edit", (t) => {
@@ -21095,7 +21130,7 @@ const GridIcon = /* @__PURE__ */ _export_sfc$1(_sfc_main$1i, [["render", _sfc_re
21095
21130
  return this.controlConfig;
21096
21131
  },
21097
21132
  isRequired(e) {
21098
- return !!(!this.isFormSubTable && this.lineEdit.editable && this.isEditable && e && this.column.validations && this.column.validations.indexOf('"required":true') > 0);
21133
+ return console.log("isRequired---this.lineEdit=", this.lineEdit), !!(!this.isFormSubTable && this.lineEdit && this.lineEdit.editable && this.isEditable && e && this.column.validations && this.column.validations.indexOf('"required":true') > 0);
21099
21134
  },
21100
21135
  getFormatIconSetting(e) {
21101
21136
  this.transferColumnDataToUpperCase(e);
@@ -21150,18 +21185,18 @@ const GridIcon = /* @__PURE__ */ _export_sfc$1(_sfc_main$1i, [["render", _sfc_re
21150
21185
  function _sfc_render$V(e, t, n, o, l, u) {
21151
21186
  const d = resolveComponent("dynamic-input"), v = resolveComponent("el-dropdown-item"), _ = resolveComponent("el-dropdown-menu"), E = resolveComponent("el-dropdown"), S = resolveComponent("row-operation"), k = resolveComponent("secret-info"), O = resolveComponent("FsPreview"), B = resolveComponent("el-icon"), R = resolveComponent("el-link"), H = resolveComponent("el-tooltip"), j = resolveComponent("GridIcon"), X = resolveComponent("view-image-dialog"), $ = resolveComponent("rich-editor-viewer"), L = resolveDirective("permission");
21152
21187
  return openBlock(), createElementBlock("div", _hoisted_1$Z, [
21153
- u.lineEdit.editable && l.isEditable && n.row.$editing || n.isShowForm ? (openBlock(), createBlock(d, {
21188
+ l.lineEdit.editable && l.isEditable && n.row.$editing || n.isShowForm ? (openBlock(), createBlock(d, {
21154
21189
  key: 0,
21155
21190
  value: n.row[n.column.prop],
21156
21191
  "onUpdate:value": t[0] || (t[0] = (ne) => n.row[n.column.prop] = ne),
21157
21192
  class: normalizeClass(l.requiredClass),
21158
21193
  column: n.column,
21159
21194
  "is-sql": n.isSql,
21160
- "line-edit": u.lineEdit,
21195
+ "line-edit": l.lineEdit,
21161
21196
  "list-code": n.listCode,
21162
21197
  "list-toolbar-form-data": n.listToolbarFormData,
21163
21198
  options: n.column.valueSet,
21164
- "grid-options": n.options,
21199
+ "grid-options": l.options,
21165
21200
  position: {
21166
21201
  row: n.rowIndex,
21167
21202
  prop: n.column.prop
@@ -21494,7 +21529,7 @@ function _sfc_render$V(e, t, n, o, l, u) {
21494
21529
  }, null, 8, ["onCloseRichEditorContent"])) : createCommentVNode("", !0)
21495
21530
  ]);
21496
21531
  }
21497
- const NormalColumnContent = /* @__PURE__ */ _export_sfc$1(_sfc_main$1h, [["render", _sfc_render$V], ["__scopeId", "data-v-cde78d9b"]]), normalColumn_vue_vue_type_style_index_0_scoped_50885526_lang = "", _sfc_main$1g = {
21532
+ const NormalColumnContent = /* @__PURE__ */ _export_sfc$1(_sfc_main$1h, [["render", _sfc_render$V], ["__scopeId", "data-v-bdebf40d"]]), _sfc_main$1g = {
21498
21533
  components: {
21499
21534
  DynamicInput,
21500
21535
  RowOperation,
@@ -21559,16 +21594,11 @@ const NormalColumnContent = /* @__PURE__ */ _export_sfc$1(_sfc_main$1h, [["rende
21559
21594
  listToolbarFormData: {
21560
21595
  type: Object,
21561
21596
  default: null
21562
- },
21563
- // 列表配置信息
21564
- options: {
21565
- type: Object,
21566
- default: null
21567
21597
  }
21568
21598
  },
21569
21599
  data() {
21570
21600
  let e;
21571
- const t = store$1.get(this.listCode);
21601
+ const t = store$1.get(this.listCode), n = t.options;
21572
21602
  return t.options.extraParam && t.options.extraParam.entityMap && (e = t.options.extraParam.entityMap), {
21573
21603
  selectRow: null,
21574
21604
  that: this,
@@ -21583,7 +21613,8 @@ const NormalColumnContent = /* @__PURE__ */ _export_sfc$1(_sfc_main$1h, [["rende
21583
21613
  isShowAdd: !1,
21584
21614
  // 是否显示表头的新增按钮
21585
21615
  cellWidth: null,
21586
- parentFormData: e
21616
+ parentFormData: e,
21617
+ options: n
21587
21618
  };
21588
21619
  },
21589
21620
  computed: {
@@ -21745,12 +21776,12 @@ function _sfc_render$U(e, t, n, o, l, u) {
21745
21776
  "list-code": n.listCode,
21746
21777
  "new-width": n.newWidth,
21747
21778
  "drag-column-prop": n.dragColumnProp,
21748
- "right-click-menu-arr": n.options.rightClickMenuArr,
21779
+ "right-click-menu-arr": l.options.rightClickMenuArr,
21749
21780
  "table-name": n.tableName,
21750
21781
  "page-code": n.pageCode,
21751
21782
  "list-toolbar-form-data": n.listToolbarFormData,
21752
21783
  "list-name": n.listName,
21753
- options: n.options,
21784
+ options: l.options,
21754
21785
  "current-page": n.currentPage,
21755
21786
  "grid-data": n.gridData,
21756
21787
  "page-grid-data": n.pageGridData,
@@ -21770,7 +21801,7 @@ function _sfc_render$U(e, t, n, o, l, u) {
21770
21801
  _: 1
21771
21802
  }, 8, ["align", "class-name", "filter-method", "filters", "fixed", "header-align", "prop", "sortable", "width"]);
21772
21803
  }
21773
- const NormalColumn = /* @__PURE__ */ _export_sfc$1(_sfc_main$1g, [["render", _sfc_render$U], ["__scopeId", "data-v-50885526"]]), _sfc_main$1f = {
21804
+ const NormalColumn = /* @__PURE__ */ _export_sfc$1(_sfc_main$1g, [["render", _sfc_render$U]]), _sfc_main$1f = {
21774
21805
  name: "GroupColumn",
21775
21806
  components: {
21776
21807
  NormalColumn
@@ -26720,7 +26751,7 @@ function isHasPermission(e, t) {
26720
26751
  if (o !== void 0 && o === !0)
26721
26752
  return !0;
26722
26753
  }
26723
- const superGrid_vue_vue_type_style_index_0_scoped_43dedc59_rel_stylesheet_2Fscss_lang = "", _sfc_main$10 = {
26754
+ const superGrid_vue_vue_type_style_index_0_scoped_d065edc0_rel_stylesheet_2Fscss_lang = "", _sfc_main$10 = {
26724
26755
  components: {
26725
26756
  IndexColumn,
26726
26757
  SelectionColumn,
@@ -28239,9 +28270,6 @@ const superGrid_vue_vue_type_style_index_0_scoped_43dedc59_rel_stylesheet_2Fscss
28239
28270
  },
28240
28271
  closeRowForm() {
28241
28272
  this.showRowForm = !1;
28242
- },
28243
- testFunc(e) {
28244
- console.log("testFunc-----------------params=", e);
28245
28273
  }
28246
28274
  },
28247
28275
  emits: [
@@ -28497,7 +28525,7 @@ function _sfc_render$E(e, t, n, o, l, u) {
28497
28525
  }, null, 8, ["parent-form-data", "columns", "row-index", "list-code", "drag-column-prop", "is-sql", "base-url", "options", "table-name", "page-code", "list-toolbar-form-data", "list-name", "current-page", "grid-data", "page-grid-data", "line-edit", "onClose", "onRefresData", "onRefresPortData", "onRefresPortsData", "onRefresMainTableFields", "onOpenPage", "onProhibitToEdit"])) : createCommentVNode("", !0)
28498
28526
  ], 4);
28499
28527
  }
28500
- const SuperGrid = /* @__PURE__ */ _export_sfc$1(_sfc_main$10, [["render", _sfc_render$E], ["__scopeId", "data-v-43dedc59"]]);
28528
+ const SuperGrid = /* @__PURE__ */ _export_sfc$1(_sfc_main$10, [["render", _sfc_render$E], ["__scopeId", "data-v-d065edc0"]]);
28501
28529
  SuperGrid.install = function(e) {
28502
28530
  e.component(SuperGrid.name, SuperGrid);
28503
28531
  };
@@ -61699,7 +61727,7 @@ const _hoisted_1$7 = ["accept"], _hoisted_2$4 = ["accept"], _hoisted_3$4 = ["acc
61699
61727
  };
61700
61728
  function _sfc_render$7(e, t, n, o, l, u) {
61701
61729
  const d = resolveComponent("el-button"), v = resolveComponent("el-input"), _ = resolveComponent("el-upload"), E = resolveComponent("el-dialog"), S = resolveComponent("el-image"), k = resolveComponent("el-table-column"), O = resolveComponent("el-icon-view"), B = resolveComponent("el-icon"), R = resolveComponent("el-tooltip"), H = resolveComponent("el-icon-delete"), j = resolveComponent("el-table"), X = resolveComponent("FileUploadInputMobile"), $ = resolveComponent("fs-preview");
61702
- return openBlock(), createElementBlock("div", null, [
61730
+ return openBlock(), createElementBlock("span", null, [
61703
61731
  n.disabled ? (openBlock(), createBlock($, {
61704
61732
  key: 1,
61705
61733
  entity: n.row,