mooho-base-admin-plus 0.4.11 → 0.4.12

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.
@@ -37357,7 +37357,7 @@ function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
37357
37357
  ]);
37358
37358
  }
37359
37359
  var tableFilter = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$r]]);
37360
- var viewTable_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => ".image-group[data-v-1a234aab]{display:flex}.image-group .image[data-v-1a234aab]{border:solid 1px #ccc;width:75px;height:75px;margin:2px 1px;cursor:pointer}.image-group .image img[data-v-1a234aab]{width:75px;height:75px}\n")();
37360
+ var viewTable_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => ".image-group[data-v-08df1208]{display:flex}.image-group .image[data-v-08df1208]{border:solid 1px #ccc;width:75px;height:75px;margin:2px 1px;cursor:pointer}.image-group .image img[data-v-08df1208]{width:75px;height:75px}\n")();
37361
37361
  var getColumns = (view, item) => {
37362
37362
  let children = view.viewColumns.filter((i2) => {
37363
37363
  return i2.parentCode == item.code;
@@ -37423,7 +37423,8 @@ const _sfc_main$q = {
37423
37423
  commandButtons: [],
37424
37424
  preview: false,
37425
37425
  imageUrl: null,
37426
- isFullScreen: false
37426
+ isFullScreen: false,
37427
+ commandButtonParams: null
37427
37428
  };
37428
37429
  },
37429
37430
  async created() {
@@ -38486,18 +38487,21 @@ const _sfc_main$q = {
38486
38487
  clickCommandButton(row, commandButton) {
38487
38488
  if (commandButton.viewType == "TableView") {
38488
38489
  this.$refs.modalTable.init(commandButton.viewCode, async () => {
38489
- let params = {};
38490
+ if (!!(commandButton.formViewCode || "").trim()) {
38491
+ this.$refs.modalForm.init(commandButton.formViewCode);
38492
+ }
38493
+ this.commandButtonParams = {};
38490
38494
  if (!!(commandButton.params || "").trim()) {
38491
38495
  let commandButtonParams = JSON.parse(commandButton.params);
38492
38496
  for (let i2 = 0; i2 < commandButtonParams.length; i2++) {
38493
38497
  let value = this.parseData(row, commandButtonParams[i2].value);
38494
- params[commandButtonParams[i2].param] = value;
38498
+ this.commandButtonParams[commandButtonParams[i2].param] = value;
38495
38499
  }
38496
38500
  }
38497
- this.$refs.modalTable.open(params);
38501
+ this.$refs.modalTable.open(this.commandButtonParams);
38498
38502
  });
38499
38503
  } else {
38500
- this.$refs.modalForm.init(commandButton.viewCode, async () => {
38504
+ this.$refs.modalForm.init(commandButton.formViewCode, async () => {
38501
38505
  this.$refs.modalForm.open(row);
38502
38506
  });
38503
38507
  }
@@ -39245,12 +39249,14 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
39245
39249
  }, null, 8, ["onSave"])) : createCommentVNode("", true),
39246
39250
  $data.inited ? (openBlock(), createBlock(_component_modal_table, {
39247
39251
  key: 4,
39248
- ref: "modalTable"
39252
+ ref: "modalTable",
39253
+ onCreate: _cache[8] || (_cache[8] = ($event) => _ctx.$refs.modalForm.openDefault($data.commandButtonParams)),
39254
+ onEdit: _cache[9] || (_cache[9] = ({ row, index: index2 }) => _ctx.$refs.modalForm.open(row))
39249
39255
  }, null, 512)) : createCommentVNode("", true),
39250
39256
  $data.inited ? (openBlock(), createBlock(_component_modal_form, {
39251
39257
  key: 5,
39252
39258
  ref: "modalForm",
39253
- saveEnable: false
39259
+ onOnAfterSave: _cache[10] || (_cache[10] = ($event) => _ctx.$refs.modalTable.loadData())
39254
39260
  }, null, 512)) : createCommentVNode("", true),
39255
39261
  $data.inited ? (openBlock(), createBlock(_component_modal_table, {
39256
39262
  key: 6,
@@ -39263,7 +39269,7 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
39263
39269
  createVNode$1(_component_Button, {
39264
39270
  type: "primary",
39265
39271
  "custom-icon": "fa fa-save",
39266
- onClick: _cache[8] || (_cache[8] = ($event) => $options.batchSave())
39272
+ onClick: _cache[11] || (_cache[11] = ($event) => $options.batchSave())
39267
39273
  }, {
39268
39274
  default: withCtx(() => [
39269
39275
  createTextVNode(toDisplayString$1(_ctx.$t("Front_Btn_Save")), 1)
@@ -39273,7 +39279,7 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
39273
39279
  createVNode$1(_component_Button, {
39274
39280
  type: "default",
39275
39281
  "custom-icon": "fa fa-times",
39276
- onClick: _cache[9] || (_cache[9] = ($event) => _ctx.$refs.batchEditTable.close())
39282
+ onClick: _cache[12] || (_cache[12] = ($event) => _ctx.$refs.batchEditTable.close())
39277
39283
  }, {
39278
39284
  default: withCtx(() => [
39279
39285
  createTextVNode(toDisplayString$1(_ctx.$t("Front_Btn_Close")), 1)
@@ -39286,7 +39292,7 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
39286
39292
  createVNode$1(_component_Modal, {
39287
39293
  title: _ctx.$t("Front_Label_Preview"),
39288
39294
  modelValue: $data.preview,
39289
- "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => $data.preview = $event),
39295
+ "onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => $data.preview = $event),
39290
39296
  scrollable: "",
39291
39297
  "mask-closable": _ctx.layout.maskClosable,
39292
39298
  draggable: _ctx.layout.draggable,
@@ -39298,7 +39304,7 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
39298
39304
  createVNode$1(_component_Button, {
39299
39305
  type: "default",
39300
39306
  "custom-icon": "fa fa-times",
39301
- onClick: _cache[10] || (_cache[10] = ($event) => $data.preview = false)
39307
+ onClick: _cache[13] || (_cache[13] = ($event) => $data.preview = false)
39302
39308
  }, {
39303
39309
  default: withCtx(() => [
39304
39310
  createTextVNode(toDisplayString$1(_ctx.$t("Front_Btn_Close")), 1)
@@ -39326,7 +39332,7 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
39326
39332
  ], 2)
39327
39333
  ], 2);
39328
39334
  }
39329
- var ViewTable = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$q], ["__scopeId", "data-v-1a234aab"]]);
39335
+ var ViewTable = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$q], ["__scopeId", "data-v-08df1208"]]);
39330
39336
  const _sfc_main$p = {
39331
39337
  mixins: [mixinPage],
39332
39338
  components: { columnSelect, columnEdit },
@@ -47478,7 +47484,7 @@ function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
47478
47484
  footer: withCtx(() => [
47479
47485
  createElementVNode("div", null, [
47480
47486
  renderSlot(_ctx.$slots, "footer", {}, () => [
47481
- $options.canSave() && $props.saveEnable ? (openBlock(), createBlock(_component_Button, {
47487
+ $options.canSave() && $props.saveEnable && !$data.formView.editEnable ? (openBlock(), createBlock(_component_Button, {
47482
47488
  key: 0,
47483
47489
  type: "primary",
47484
47490
  "custom-icon": "fa fa-save",