form-custom-test 3.0.116 → 3.0.118

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/dist/render.es.js CHANGED
@@ -26185,13 +26185,13 @@ function registerIcon(app) {
26185
26185
  if (typeof window !== "undefined") {
26186
26186
  let loadSvg = function() {
26187
26187
  var body = document.body;
26188
- var svgDom = document.getElementById("__svg__icons__dom__1777457232091__");
26188
+ var svgDom = document.getElementById("__svg__icons__dom__1777525842236__");
26189
26189
  if (!svgDom) {
26190
26190
  svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
26191
26191
  svgDom.style.position = "absolute";
26192
26192
  svgDom.style.width = "0";
26193
26193
  svgDom.style.height = "0";
26194
- svgDom.id = "__svg__icons__dom__1777457232091__";
26194
+ svgDom.id = "__svg__icons__dom__1777525842236__";
26195
26195
  svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
26196
26196
  svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
26197
26197
  }
@@ -35869,7 +35869,7 @@ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
35869
35869
  _: 1
35870
35870
  }, 8, ["designer", "widget", "parent-widget", "parent-list", "index-of-parent-list"]);
35871
35871
  }
35872
- var SubTableWidget = /* @__PURE__ */ _export_sfc$1(_sfc_main$9, [["render", _sfc_render$9], ["__scopeId", "data-v-03a3b831"]]);
35872
+ var SubTableWidget = /* @__PURE__ */ _export_sfc$1(_sfc_main$9, [["render", _sfc_render$9], ["__scopeId", "data-v-1fb729c8"]]);
35873
35873
  var subTableItem_vue_vue_type_style_index_0_scoped_true_lang = "";
35874
35874
  const _sfc_main$8 = {
35875
35875
  name: "sub-table-item",
@@ -36248,7 +36248,6 @@ const _hoisted_2$5 = {
36248
36248
  const _hoisted_3$3 = { class: "table-toolbar" };
36249
36249
  const _hoisted_4$2 = { class: "dialog-footer" };
36250
36250
  function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
36251
- const _component_svg_icon = resolveComponent("svg-icon");
36252
36251
  const _component_el_button = resolveComponent("el-button");
36253
36252
  const _component_el_table_column = resolveComponent("el-table-column");
36254
36253
  const _component_el_table = resolveComponent("el-table");
@@ -36280,12 +36279,12 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
36280
36279
  type: "primary",
36281
36280
  size: "small",
36282
36281
  disabled: $props.widget.options.disabled,
36283
- onClick: $options.handleAddRow
36282
+ onClick: $options.handleAddRow,
36283
+ icon: "el-icon-plus"
36284
36284
  }, {
36285
- default: withCtx(() => [
36286
- createVNode(_component_svg_icon, { "icon-class": "el-plus" }),
36287
- _cache[2] || (_cache[2] = createTextVNode(" \u65B0\u589E ", -1))
36288
- ]),
36285
+ default: withCtx(() => [..._cache[2] || (_cache[2] = [
36286
+ createTextVNode(" \u65B0\u589E ", -1)
36287
+ ])]),
36289
36288
  _: 1
36290
36289
  }, 8, ["disabled", "onClick"])) : createCommentVNode("", true)
36291
36290
  ]),
@@ -36503,7 +36502,7 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
36503
36502
  _: 1
36504
36503
  }, 8, ["widget"]);
36505
36504
  }
36506
- var SubTableItem = /* @__PURE__ */ _export_sfc$1(_sfc_main$8, [["render", _sfc_render$8], ["__scopeId", "data-v-47eddd0f"]]);
36505
+ var SubTableItem = /* @__PURE__ */ _export_sfc$1(_sfc_main$8, [["render", _sfc_render$8], ["__scopeId", "data-v-21c20fec"]]);
36507
36506
  var ace$2 = { exports: {} };
36508
36507
  (function(module, exports) {
36509
36508
  (function() {
@@ -61832,11 +61831,11 @@ const _sfc_main$4 = {
61832
61831
  },
61833
61832
  assetTypeValue: {
61834
61833
  handler(newVal) {
61834
+ this.disabled = !!newVal;
61835
61835
  if (newVal) {
61836
61836
  this.form.assetType = newVal;
61837
- this.disabled = true;
61838
61837
  } else {
61839
- this.disabled = false;
61838
+ this.form.assetType = "all";
61840
61839
  }
61841
61840
  },
61842
61841
  immediate: true
@@ -61858,7 +61857,7 @@ const _sfc_main$4 = {
61858
61857
  assetTypeOptions: [],
61859
61858
  form: {
61860
61859
  assetCode: "",
61861
- assetType: "",
61860
+ assetType: "all",
61862
61861
  assetOwnerUnit: "",
61863
61862
  labelName: ""
61864
61863
  },
@@ -61871,9 +61870,21 @@ const _sfc_main$4 = {
61871
61870
  },
61872
61871
  methods: {
61873
61872
  handleClose() {
61873
+ this.form = {
61874
+ assetCode: "",
61875
+ assetType: "all",
61876
+ assetOwnerUnit: "",
61877
+ labelName: ""
61878
+ };
61874
61879
  this.$emit("close");
61875
61880
  },
61876
61881
  handleConfirm() {
61882
+ this.form = {
61883
+ assetCode: "",
61884
+ assetType: "all",
61885
+ assetOwnerUnit: "",
61886
+ labelName: ""
61887
+ };
61877
61888
  this.$emit("confirm", this.selectedRows);
61878
61889
  },
61879
61890
  handleSelectionChange(selection) {
@@ -61904,7 +61915,7 @@ const _sfc_main$4 = {
61904
61915
  service$1({
61905
61916
  method: "post",
61906
61917
  url: "/asset-business/overview/pageList",
61907
- data: __spreadValues({ size: this.pageSize, current: this.currentPage, reqType: "disposal" }, this.form)
61918
+ data: __spreadProps(__spreadValues({ size: this.pageSize, current: this.currentPage, reqType: "disposal" }, this.form), { assetType: this.form.assetType === "all" ? "" : this.form.assetType })
61908
61919
  }).then(({ data: data2 }) => {
61909
61920
  const { records, total, current } = data2;
61910
61921
  this.tableData = records.map((item) => {
@@ -61932,39 +61943,19 @@ const _sfc_main$4 = {
61932
61943
  if (!selection || selection.length === 0) {
61933
61944
  return;
61934
61945
  }
61935
- if (this.limit === 1) {
61936
- const picked = selection[selection.length - 1];
61937
- this.selectedRows = picked ? [picked] : [];
61938
- if (tableRef && typeof tableRef.clearSelection === "function") {
61939
- tableRef.clearSelection();
61940
- }
61941
- return;
61942
- }
61943
- if (this.limit > 1) {
61944
- const acc = [...this.selectedRows];
61945
- selection.forEach((item) => {
61946
- if (acc.length >= this.limit)
61947
- return;
61948
- if (!acc.some((i) => i.assetId === item.assetId)) {
61949
- acc.push(item);
61950
- }
61951
- });
61952
- this.selectedRows = acc;
61953
- if (tableRef && typeof tableRef.clearSelection === "function") {
61954
- tableRef.clearSelection();
61955
- }
61956
- return;
61957
- }
61958
61946
  const arr = [...this.selectedRows, ...selection].reduce((acc, item) => {
61959
61947
  if (!acc.some((i) => i.assetId === item.assetId)) {
61960
61948
  acc.push(item);
61961
61949
  }
61962
61950
  return acc;
61963
61951
  }, []);
61964
- this.selectedRows = arr;
61965
- if (tableRef && typeof tableRef.clearSelection === "function") {
61966
- tableRef.clearSelection();
61952
+ if (this.limit) {
61953
+ if (arr.length > this.limit) {
61954
+ this.$message.error(`\u6700\u591A\u9009\u62E9 ${this.limit} \u4E2A\u8D44\u4EA7`);
61955
+ return;
61956
+ }
61967
61957
  }
61958
+ this.selectedRows = arr;
61968
61959
  },
61969
61960
  handleRemove(assetId) {
61970
61961
  const index2 = this.selectedRows.findIndex((item) => item.assetId === assetId);
@@ -61986,6 +61977,10 @@ const _sfc_main$4 = {
61986
61977
  label: item.label,
61987
61978
  value: item.itemValue
61988
61979
  }));
61980
+ this.assetTypeOptions.unshift({
61981
+ label: "\u5168\u90E8",
61982
+ value: "all"
61983
+ });
61989
61984
  });
61990
61985
  },
61991
61986
  handleSearch() {
@@ -62063,7 +62058,10 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
62063
62058
  createElementVNode("div", _hoisted_2$2, [
62064
62059
  createElementVNode("div", _hoisted_3$1, [
62065
62060
  createElementVNode("div", _hoisted_4, [
62066
- createVNode(_component_el_form, { model: $data.form }, {
62061
+ createVNode(_component_el_form, {
62062
+ model: $data.form,
62063
+ ref: "formRef"
62064
+ }, {
62067
62065
  default: withCtx(() => [
62068
62066
  createVNode(_component_el_row, { gutter: 12 }, {
62069
62067
  default: withCtx(() => [
@@ -62075,7 +62073,8 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
62075
62073
  maxlength: "50",
62076
62074
  modelValue: $data.form.assetCode,
62077
62075
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.form.assetCode = $event),
62078
- placeholder: "\u8BF7\u8F93\u5165"
62076
+ placeholder: "\u8BF7\u8F93\u5165",
62077
+ clearable: ""
62079
62078
  }, {
62080
62079
  prefix: withCtx(() => [..._cache[7] || (_cache[7] = [
62081
62080
  createElementVNode("span", null, "\u8D44\u4EA7\u7F16\u7801\uFF1A", -1)
@@ -62096,7 +62095,8 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
62096
62095
  maxlength: "50",
62097
62096
  modelValue: $data.form.labelName,
62098
62097
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.form.labelName = $event),
62099
- placeholder: "\u8BF7\u8F93\u5165"
62098
+ placeholder: "\u8BF7\u8F93\u5165",
62099
+ clearable: ""
62100
62100
  }, {
62101
62101
  prefix: withCtx(() => [..._cache[8] || (_cache[8] = [
62102
62102
  createElementVNode("span", null, "\u8D44\u4EA7\u540D\u79F0\uFF1A", -1)
@@ -62117,7 +62117,8 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
62117
62117
  disabled: $data.disabled,
62118
62118
  modelValue: $data.form.assetType,
62119
62119
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.form.assetType = $event),
62120
- placeholder: "\u8BF7\u9009\u62E9"
62120
+ placeholder: "\u8BF7\u9009\u62E9",
62121
+ clearable: ""
62121
62122
  }, {
62122
62123
  prefix: withCtx(() => [..._cache[9] || (_cache[9] = [
62123
62124
  createElementVNode("span", null, "\u8D44\u4EA7\u7C7B\u578B\uFF1A", -1)
@@ -62147,7 +62148,8 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
62147
62148
  maxlength: "50",
62148
62149
  modelValue: $data.form.assetOwnerUnit,
62149
62150
  "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.form.assetOwnerUnit = $event),
62150
- placeholder: "\u8BF7\u8F93\u5165"
62151
+ placeholder: "\u8BF7\u8F93\u5165",
62152
+ clearable: ""
62151
62153
  }, {
62152
62154
  prefix: withCtx(() => [..._cache[10] || (_cache[10] = [
62153
62155
  createElementVNode("span", null, "\u4EA7\u6743\u6240\u5C5E\u5355\u4F4D\uFF1A", -1)
@@ -62193,7 +62195,6 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
62193
62195
  "check-strictly": "",
62194
62196
  "row-key": "assetId",
62195
62197
  ref: "tableRef",
62196
- onSelectionChange: $options.handleSelectionChange,
62197
62198
  "header-row-class-name": "headerRowClassName",
62198
62199
  "header-cell-class-name": "headerCellClassName",
62199
62200
  stripe: ""
@@ -62244,7 +62245,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
62244
62245
  })
62245
62246
  ]),
62246
62247
  _: 1
62247
- }, 8, ["data", "onSelectionChange"]),
62248
+ }, 8, ["data"]),
62248
62249
  createVNode(_component_el_pagination, {
62249
62250
  onSizeChange: $options.handleSizeChange,
62250
62251
  onCurrentChange: $options.handleCurrentChange,
@@ -62322,7 +62323,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
62322
62323
  _: 1
62323
62324
  }, 8, ["modelValue", "onClose"]);
62324
62325
  }
62325
- var AssetDialog = /* @__PURE__ */ _export_sfc$1(_sfc_main$4, [["render", _sfc_render$4], ["__scopeId", "data-v-58c3d01c"]]);
62326
+ var AssetDialog = /* @__PURE__ */ _export_sfc$1(_sfc_main$4, [["render", _sfc_render$4], ["__scopeId", "data-v-6f20caea"]]);
62326
62327
  var index_vue_vue_type_style_index_0_lang$1 = "";
62327
62328
  const _sfc_main$3 = {
62328
62329
  name: "asset-select-widget",
@@ -63090,7 +63091,8 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
63090
63091
  ]),
63091
63092
  _: 1
63092
63093
  }),
63093
- createVNode(_component_el_table_column, {
63094
+ !$props.field.options.disabled ? (openBlock(), createBlock(_component_el_table_column, {
63095
+ key: 0,
63094
63096
  prop: "isUpdate",
63095
63097
  align: "center",
63096
63098
  "header-align": "center",
@@ -63100,7 +63102,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
63100
63102
  createTextVNode(toDisplayString(row.isUpdate ? "\u662F" : "\u5426"), 1)
63101
63103
  ]),
63102
63104
  _: 1
63103
- })
63105
+ })) : createCommentVNode("", true)
63104
63106
  ]),
63105
63107
  _: 1
63106
63108
  }, 8, ["data"])