mooho-base-admin-plus 2.7.6 → 2.8.0

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/history.md CHANGED
@@ -139,3 +139,4 @@ mooho-base-admin-plus@2.7.3 - 修复公式最后一位为)时的bug
139
139
  mooho-base-admin-plus@2.7.4 - 修复全选的bug
140
140
  mooho-base-admin-plus@2.7.5 - 将List组件改为后端分页
141
141
  mooho-base-admin-plus@2.7.6 - 修复审批后没有刷新的bug
142
+ mooho-base-admin-plus@2.7.7 - 增加自定义显示格式
@@ -11045,15 +11045,21 @@ const saveAs = /* @__PURE__ */ getDefaultExportFromCjs(FileSaver_minExports), mo
11045
11045
  }
11046
11046
  });
11047
11047
  },
11048
- query(r, a, o, s) {
11049
- return (o == null || o == "") && (o = "query"), (s == null || s == "") && (s = "post"), a.isGroupBy ? (a.modelName = r, service({
11048
+ query(r, a, o, s, l, u) {
11049
+ (l == null || l == "") && (l = "query"), (u == null || u == "") && (u = "post");
11050
+ let c = {
11051
+ ...a,
11052
+ columns: o,
11053
+ viewCode: s ? s.code : null
11054
+ };
11055
+ return a.isGroupBy ? (c.modelName = r, service({
11050
11056
  url: "api/Model/group",
11051
11057
  method: "post",
11052
- data: a
11058
+ data: c
11053
11059
  })) : service({
11054
- url: `api/${r}/${o}`,
11055
- method: s,
11056
- data: a
11060
+ url: `api/${r}/${l}`,
11061
+ method: u,
11062
+ data: c
11057
11063
  });
11058
11064
  },
11059
11065
  async exportExcel(r, a) {
@@ -16660,7 +16666,7 @@ const initRouter = (r, a) => {
16660
16666
  }), router.afterEach((o) => {
16661
16667
  Setting.showProgressBar && ViewUIPlus.LoadingBar.finish(), setting.layout.tabs && store.dispatch("admin/page/open", o), window.document.title = window.$app.$t(o.meta.title) + " - " + Setting.info.title, window.scrollTo(0, 0);
16662
16668
  });
16663
- }, router$1 = router, mixinPage = {
16669
+ }, router$1 = router, showFormat = {}, mixinPage = {
16664
16670
  data() {
16665
16671
  return {
16666
16672
  grid4: {
@@ -16822,6 +16828,11 @@ const initRouter = (r, a) => {
16822
16828
  let d = this.parseData(r, o);
16823
16829
  if (d == null)
16824
16830
  return null;
16831
+ if (showFormat.customFormat) {
16832
+ let f = showFormat.customFormat(r, a);
16833
+ if (f != null)
16834
+ return f;
16835
+ }
16825
16836
  if (s === "DateTime")
16826
16837
  return (l || "").trim() ? format$4(new Date(d), l) : format$4(new Date(d), "yyyy-MM-dd");
16827
16838
  if (s === "Integer")
@@ -21613,21 +21624,23 @@ const processType = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["render", _sfc_r
21613
21624
  }
21614
21625
  });
21615
21626
  },
21616
- query(r, a) {
21617
- let o = a.isGroupBy ? "group" : "query";
21627
+ query(r, a, o, s) {
21628
+ let l = a.isGroupBy ? "group" : "query", u = {
21629
+ modelName: r,
21630
+ ...a,
21631
+ columns: o,
21632
+ viewCode: s ? s.code : null
21633
+ };
21618
21634
  return service({
21619
- url: `api/${res$8}/${o}`,
21635
+ url: `api/${res$8}/${l}`,
21620
21636
  method: "post",
21621
- data: {
21622
- ...a,
21623
- modelName: r
21624
- }
21637
+ data: u
21625
21638
  });
21626
21639
  },
21627
21640
  async exportExcel(r, a) {
21628
21641
  let o = {
21629
- ...a,
21630
21642
  modelName: r.model,
21643
+ ...a,
21631
21644
  per: r.maxExportCount == null ? 1e6 : r.maxExportCount,
21632
21645
  returnType: 1,
21633
21646
  viewCode: (r.exportDataViewCode || "").trim() ? r.exportDataViewCode : r.code
@@ -21650,8 +21663,8 @@ const processType = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["render", _sfc_r
21650
21663
  },
21651
21664
  async exportPdf(r, a) {
21652
21665
  let o = {
21653
- ...a,
21654
21666
  modelName: r.model,
21667
+ ...a,
21655
21668
  per: 1e5,
21656
21669
  returnType: 3,
21657
21670
  viewCode: (r.exportDataViewCode || "").trim() ? r.exportDataViewCode : r.code
@@ -25797,7 +25810,7 @@ const taskQueue = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["render", _sfc_rend
25797
25810
  // 填充数据源
25798
25811
  async fillDataSource(r, a) {
25799
25812
  let o;
25800
- r.isSourceCustom ? o = await customModelApi.query(r.source, a) : o = await modelApi.query(r.source, a), o.data.forEach((s) => {
25813
+ r.isSourceCustom ? o = await customModelApi.query(r.source, a, [r.sourceDataCode, r.sourceDisplayCode]) : o = await modelApi.query(r.source, a, [r.sourceDataCode, r.sourceDisplayCode]), o.data.forEach((s) => {
25801
25814
  r._dataSource.push({
25802
25815
  id: (r.sourceDataCode || "").trim() ? this.parseData(s, r.sourceDataCode) : s.id,
25803
25816
  name: this.parseData(s, r.sourceDisplayCode)
@@ -26471,22 +26484,23 @@ const processPage = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["render", _sfc_re
26471
26484
  default: processPage
26472
26485
  }, Symbol.toStringTag, { value: "Module" })), res$1 = "DataSource", dataSourceApi = {
26473
26486
  query(r, a) {
26487
+ let o = {
26488
+ dataSource: r,
26489
+ ...a
26490
+ };
26474
26491
  return service({
26475
26492
  url: `api/${res$1}/query`,
26476
26493
  method: "post",
26477
- data: {
26478
- ...a,
26479
- dataSource: r
26480
- }
26494
+ data: o
26481
26495
  });
26482
26496
  },
26483
26497
  async exportExcel(r, a, o = "query") {
26484
26498
  let s = {
26499
+ dataSource: r.dataSource,
26485
26500
  ...a,
26486
26501
  per: r.maxExportCount == null ? 1e6 : r.maxExportCount,
26487
26502
  returnType: 1,
26488
- viewCode: (r.exportDataViewCode || "").trim() ? r.exportDataViewCode : r.code,
26489
- dataSource: r.dataSource
26503
+ viewCode: (r.exportDataViewCode || "").trim() ? r.exportDataViewCode : r.code
26490
26504
  };
26491
26505
  const l = await service({
26492
26506
  url: `api/${res$1}/${o}`,
@@ -26500,11 +26514,11 @@ const processPage = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["render", _sfc_re
26500
26514
  },
26501
26515
  async exportPdf(r, a, o = "query") {
26502
26516
  let s = {
26517
+ dataSource: r.dataSource,
26503
26518
  ...a,
26504
26519
  per: 1e5,
26505
26520
  returnType: 3,
26506
- viewCode: (r.exportDataViewCode || "").trim() ? r.exportDataViewCode : r.code,
26507
- dataSource: r.dataSource
26521
+ viewCode: (r.exportDataViewCode || "").trim() ? r.exportDataViewCode : r.code
26508
26522
  };
26509
26523
  const l = await service({
26510
26524
  url: `api/${res$1}/${o}`,
@@ -26632,7 +26646,7 @@ const processPage = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["render", _sfc_re
26632
26646
  let o = await dataSourceApi.query(this.tableView.dataSource, a);
26633
26647
  this.total = o.totalCount, this.data = o.table;
26634
26648
  } else {
26635
- let o = await modelApi.query(this.tableView.model, a, this.tableView.functionName, this.tableView.functionType);
26649
+ let o = await modelApi.query(this.tableView.model, a, null, null, this.tableView.functionName, this.tableView.functionType);
26636
26650
  this.total = o.totalCount, this.data = o.data;
26637
26651
  }
26638
26652
  }
@@ -27305,7 +27319,7 @@ const CheckGroup = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["render", _sfc_ren
27305
27319
  let o = this.param;
27306
27320
  o[this.column.sourceDataCode] = a.map((l) => l.value).join(",");
27307
27321
  let s;
27308
- this.column.isSourceCustom ? s = await customModelApi.query(this.column.source, o) : s = await modelApi.query(this.column.source, o), s.data.forEach((l) => {
27322
+ this.column.isSourceCustom ? s = await customModelApi.query(this.column.source, o, [this.column.sourceDataCode, this.column.sourceDisplayCode]) : s = await modelApi.query(this.column.source, o, [this.column.sourceDataCode, this.column.sourceDisplayCode]), s.data.forEach((l) => {
27309
27323
  let u = this.parseData(l, this.column.sourceDataCode), c = this.parseData(l, this.column.sourceDisplayCode);
27310
27324
  this.multi || (this.$refs.select.query = c);
27311
27325
  let d = a.find((f) => f.value == u);
@@ -27464,13 +27478,13 @@ const comboSelect = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["render", _sfc_re
27464
27478
  };
27465
27479
  r[this.sourceDataCode] = JSON.parse(this.modelValue).join(","), this.loadDataView(this.source).then(async (a) => {
27466
27480
  if (a.dataView.isCustom) {
27467
- let o = await customModelApi.query(a.dataView.model, r);
27481
+ let o = await customModelApi.query(a.dataView.model, r, [this.sourceDataCode, this.sourceDisplayCode]);
27468
27482
  o.data.length > 0 && (this.selected = o.data.map((s) => this.parseData(s, this.sourceDisplayCode)).join(","), this.selectedData = o.data);
27469
27483
  } else if (a.dataView.isDataSource) {
27470
27484
  let o = await dataSourceApi.query(a.dataView.dataSource, r);
27471
27485
  o.table.length > 0 && (this.selected = o.table.map((s) => this.parseData(s, this.sourceDisplayCode)).join(","), this.selectedData = o.table);
27472
27486
  } else {
27473
- let o = await modelApi.query(a.dataView.model, r);
27487
+ let o = await modelApi.query(a.dataView.model, r, [this.sourceDataCode, this.sourceDisplayCode]);
27474
27488
  o.data.length > 0 && (this.selected = o.data.map((s) => this.parseData(s, this.sourceDisplayCode)).join(","), this.selectedData = o.data);
27475
27489
  }
27476
27490
  });
@@ -35228,7 +35242,7 @@ const draggable = /* @__PURE__ */ getDefaultExportFromCjs(vuedraggable_umdExport
35228
35242
  let s;
35229
35243
  (a.controlType === "TreeSelect" || a.controlType === "MultiTreeSelect") && (s = this.parseTreeData(r, a.code), a.dataSource = null), (a.controlType === "ComboSelect" || a.controlType === "MultiComboSelect") && (o.per = 20), this.disableLoader();
35230
35244
  let l;
35231
- if (a.isSourceCustom ? l = await customModelApi.query(a.source, o) : l = await modelApi.query(a.source, o), this.enableLoader(), a.rawData = l.data, a.controlType === "TreeSelect" || a.controlType === "MultiTreeSelect") {
35245
+ if (a.isSourceCustom ? l = await customModelApi.query(a.source, o, [a.sourceDataCode, a.sourceDisplayCode]) : l = await modelApi.query(a.source, o, [a.sourceDataCode, a.sourceDisplayCode]), this.enableLoader(), a.rawData = l.data, a.controlType === "TreeSelect" || a.controlType === "MultiTreeSelect") {
35232
35246
  let u = l.data.map((c) => ({
35233
35247
  id: (a.sourceDataCode || "").trim() ? this.parseData(c, a.sourceDataCode) : c.id,
35234
35248
  name: this.parseData(c, a.sourceDisplayCode),
@@ -35286,7 +35300,7 @@ const draggable = /* @__PURE__ */ getDefaultExportFromCjs(vuedraggable_umdExport
35286
35300
  (u || "").trim() && (o = {
35287
35301
  ...o,
35288
35302
  ...JSON.parse(u)
35289
- }), a.isSourceCustom ? s = await customModelApi.query(a.sourceModel, o) : s = await modelApi.query(a.sourceModel, o, l.functionName, l.functionType), this.$refs["list_" + a.code][0].loadData(s.data);
35303
+ }), a.isSourceCustom ? s = await customModelApi.query(a.sourceModel, o, null, l.isReturnSimple ? l : null) : s = await modelApi.query(a.sourceModel, o, null, l.isReturnSimple ? l : null, l.functionName, l.functionType), this.$refs["list_" + a.code][0].loadData(s.data);
35290
35304
  }
35291
35305
  }
35292
35306
  a.needClear = !1, a.needRefresh = !1;
@@ -35420,7 +35434,7 @@ const draggable = /* @__PURE__ */ getDefaultExportFromCjs(vuedraggable_umdExport
35420
35434
  let u = this.getParam(r, a);
35421
35435
  u[a.sourceDataCode] = l.map((d) => d.value).join(",");
35422
35436
  let c;
35423
- a.isSourceCustom ? c = await customModelApi.query(a.source, u) : c = await modelApi.query(a.source, u), c.data.forEach((d) => {
35437
+ a.isSourceCustom ? c = await customModelApi.query(a.source, u, [a.sourceDataCode, a.sourceDisplayCode]) : c = await modelApi.query(a.source, u, [a.sourceDataCode, a.sourceDisplayCode]), c.data.forEach((d) => {
35424
35438
  let f = this.parseData(d, a.sourceDataCode), p = this.parseData(d, a.sourceDisplayCode);
35425
35439
  a.controlType == "ComboSelect";
35426
35440
  let v = l.find((g) => g.value == f);
@@ -38375,7 +38389,7 @@ const modalTable = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_ren
38375
38389
  let s;
38376
38390
  (a.controlType === "TreeSelect" || a.controlType === "MultiTreeSelect") && (s = this.parseTreeFilterData(r, a), a.dataSource = null), (a.controlType === "ComboSelect" || a.controlType === "MultiComboSelect") && (o.per = 20), this.disableLoader();
38377
38391
  let l;
38378
- if (a.isSourceCustom ? l = await customModelApi.query(a.source, o) : l = await modelApi.query(a.source, o), this.enableLoader(), a.rawData = l.data, a.controlType === "TreeSelect" || a.controlType === "MultiTreeSelect") {
38392
+ if (a.isSourceCustom ? l = await customModelApi.query(a.source, o, [a.sourceDataCode, a.sourceDisplayCode]) : l = await modelApi.query(a.source, o, [a.sourceDataCode, a.sourceDisplayCode]), this.enableLoader(), a.rawData = l.data, a.controlType === "TreeSelect" || a.controlType === "MultiTreeSelect") {
38379
38393
  let u = l.data.map((c) => ({
38380
38394
  id: (a.sourceDataCode || "").trim() ? this.parseData(c, a.sourceDataCode) : c.id,
38381
38395
  name: this.parseData(c, a.sourceDisplayCode),
@@ -39583,7 +39597,7 @@ const tableSetting = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_r
39583
39597
  a ? this.$refs["table_" + r.code][0].loadData(JSON.parse(a)) : this.$refs["table_" + r.code][0].loadData([]);
39584
39598
  } else if (this.data.id) {
39585
39599
  let a, o = {}, s = this.$refs["table_" + r.code][0].tableView, l = s.filtering;
39586
- (l || "").trim() && (o = JSON.parse(l)), o[r.sourceDataCode] = this.data.id, r.isSourceCustom ? a = await customModelApi.query(r.sourceModel, o) : a = await modelApi.query(r.sourceModel, o, s.functionName, s.functionType), this.$refs["table_" + r.code][0].loadData(a.data);
39600
+ (l || "").trim() && (o = JSON.parse(l)), o[r.sourceDataCode] = this.data.id, r.isSourceCustom ? a = await customModelApi.query(r.sourceModel, o, null, s.isReturnSimple ? s : null) : a = await modelApi.query(r.sourceModel, o, null, s.isReturnSimple ? s : null, s.functionName, s.functionType), this.$refs["table_" + r.code][0].loadData(a.data);
39587
39601
  }
39588
39602
  }) : r.controlType == "Attachment" && this.$refs["attachment_" + r.code] && this.$refs["attachment_" + r.code][0].setData(this.parseData(this.data, r.code));
39589
39603
  });
@@ -39875,7 +39889,7 @@ const tableSetting = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_r
39875
39889
  let s;
39876
39890
  (a.controlType === "TreeSelect" || a.controlType === "MultiTreeSelect") && (s = this.parseTreeData(r, a.code), a.dataSource = null), (a.controlType === "ComboSelect" || a.controlType === "MultiComboSelect") && (o.per = 20), this.disableLoader();
39877
39891
  let l;
39878
- if (a.isSourceCustom ? l = await customModelApi.query(a.source, o) : l = await modelApi.query(a.source, o), this.enableLoader(), a.rawData = l.data, a.controlType === "TreeSelect" || a.controlType === "MultiTreeSelect") {
39892
+ if (a.isSourceCustom ? l = await customModelApi.query(a.source, o, [a.sourceDataCode, a.sourceDisplayCode]) : l = await modelApi.query(a.source, o, [a.sourceDataCode, a.sourceDisplayCode]), this.enableLoader(), a.rawData = l.data, a.controlType === "TreeSelect" || a.controlType === "MultiTreeSelect") {
39879
39893
  let u = l.data.map((c) => ({
39880
39894
  id: (a.sourceDataCode || "").trim() ? this.parseData(c, a.sourceDataCode) : c.id,
39881
39895
  name: this.parseData(c, a.sourceDisplayCode),
@@ -41054,13 +41068,20 @@ const _sfc_main$n = {
41054
41068
  orderBy: this.orderBy
41055
41069
  };
41056
41070
  if (this.tableView.isGroupBy && (a.isGroupBy = !0, a.groupColumn = JSON.parse(this.tableView.groupColumn), a.groupMethod = JSON.parse(this.tableView.groupMethod)), this.tableView.isCustom) {
41057
- let o = await customModelApi.query(this.tableView.model, a);
41071
+ let o = await customModelApi.query(this.tableView.model, a, null, this.tableView.isReturnSimple ? this.tableView : null);
41058
41072
  this.total = o.totalCount, this.data = o.data;
41059
41073
  } else if (this.tableView.isDataSource) {
41060
41074
  let o = await dataSourceApi.query(this.tableView.dataSource, a);
41061
41075
  this.total = o.totalCount, this.data = o.table;
41062
41076
  } else {
41063
- let o = await modelApi.query(this.tableView.model, a, this.tableView.functionName, this.tableView.functionType);
41077
+ let o = await modelApi.query(
41078
+ this.tableView.model,
41079
+ a,
41080
+ null,
41081
+ this.tableView.isReturnSimple ? this.tableView : null,
41082
+ this.tableView.functionName,
41083
+ this.tableView.functionType
41084
+ );
41064
41085
  this.total = o.totalCount, this.data = o.data;
41065
41086
  }
41066
41087
  if (this.tableView.isDynamicColumn && (this.columns = this.columns.filter((o) => o.slot != "normal"), this.data.length > 0)) {
@@ -41108,8 +41129,9 @@ const _sfc_main$n = {
41108
41129
  * @param {int} index 行序号
41109
41130
  * @public
41110
41131
  */
41111
- edit(r, a) {
41112
- this.$emit("edit", { row: r, index: a });
41132
+ async edit(r, a) {
41133
+ let o = r;
41134
+ this.tableView.isCustom ? o = await customModelApi.get(this.tableView.model, r.id) : this.tableView.isDataSource || (o = await modelApi.get(this.tableView.model, r.id)), this.$emit("edit", { row: o, index: a });
41113
41135
  },
41114
41136
  /**
41115
41137
  * 查看项
@@ -41118,8 +41140,9 @@ const _sfc_main$n = {
41118
41140
  * @param {int} index 行序号
41119
41141
  * @public
41120
41142
  */
41121
- show(r, a) {
41122
- this.$emit("show", { row: r, index: a });
41143
+ async show(r, a) {
41144
+ let o = r;
41145
+ this.tableView.isCustom ? o = await customModelApi.get(this.tableView.model, r.id) : this.tableView.isDataSource || (o = await modelApi.get(this.tableView.model, r.id)), this.$emit("show", { row: o, index: a });
41123
41146
  },
41124
41147
  /**
41125
41148
  * 删除项
@@ -41346,7 +41369,7 @@ const _sfc_main$n = {
41346
41369
  async fillDataSource(r, a, o) {
41347
41370
  r._dataSource || (r._dataSource = {}, r._rawData = {}, r._needRefresh = {}, r._needClear = {}), (a.controlType === "ComboSelect" || a.controlType === "MultiComboSelect") && (o.per = 20), this.disableLoader();
41348
41371
  let s;
41349
- if (a.isSourceCustom ? s = await customModelApi.query(a.source, o) : s = await modelApi.query(a.source, o), this.enableLoader(), r._rawData[a.code] = s.data, r._dataSource[a.code] = s.data.map((l) => ({
41372
+ if (a.isSourceCustom ? s = await customModelApi.query(a.source, o, [a.sourceDataCode, a.sourceDisplayCode]) : s = await modelApi.query(a.source, o, [a.sourceDataCode, a.sourceDisplayCode]), this.enableLoader(), r._rawData[a.code] = s.data, r._dataSource[a.code] = s.data.map((l) => ({
41350
41373
  id: (a.sourceDataCode || "").trim() ? this.parseData(l, a.sourceDataCode) : l.id,
41351
41374
  name: this.parseData(l, a.sourceDisplayCode)
41352
41375
  })), r && this.parseData(r, a.code) == null && a.isDefaultFirst && s.data.length > 0 && (this.setData(r, a.code, this.parseData(s.data[0], a.sourceDataCode)), a.sourceDataCode == "id" && a.code.length > 2)) {
@@ -41759,7 +41782,7 @@ const _sfc_main$n = {
41759
41782
  let c = this.getParam(r, a);
41760
41783
  c[a.sourceDataCode] = u.map((f) => f.value).join(",");
41761
41784
  let d;
41762
- a.isSourceCustom ? d = await customModelApi.query(a.source, c) : d = await modelApi.query(a.source, c), d.data.forEach((f) => {
41785
+ a.isSourceCustom ? d = await customModelApi.query(a.source, c, [a.sourceDataCode, a.sourceDisplayCode]) : d = await modelApi.query(a.source, c, [a.sourceDataCode, a.sourceDisplayCode]), d.data.forEach((f) => {
41763
41786
  let p = this.parseData(f, a.sourceDataCode), v = this.parseData(f, a.sourceDisplayCode);
41764
41787
  a.controlType == "ComboSelect";
41765
41788
  let g = u.find((y) => y.value == p);
@@ -42526,7 +42549,7 @@ function _sfc_render$n(r, a, o, s, l, u) {
42526
42549
  ], 2)
42527
42550
  ], 2);
42528
42551
  }
42529
- const viewTable = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$n], ["__scopeId", "data-v-38e40259"]]), __vite_glob_1_32 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
42552
+ const viewTable = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$n], ["__scopeId", "data-v-da194f9d"]]), __vite_glob_1_32 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
42530
42553
  __proto__: null,
42531
42554
  default: viewTable
42532
42555
  }, Symbol.toStringTag, { value: "Module" })), _sfc_main$m = {
@@ -89973,6 +89996,7 @@ export {
89973
89996
  service as request,
89974
89997
  router$1 as router,
89975
89998
  Setting as setting,
89999
+ showFormat,
89976
90000
  store,
89977
90001
  taskApi,
89978
90002
  util$2 as util