ocpview-pro 0.1.14 → 0.1.16

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/index.js CHANGED
@@ -453,7 +453,7 @@ common.initEview = function(ViewUI2) {
453
453
  common.initAnchor(ViewUI2.Anchor);
454
454
  };
455
455
  const name = "ocpview-pro";
456
- const version$2 = "0.1.13";
456
+ const version$2 = "0.1.16";
457
457
  const title = "ocpviewPlus";
458
458
  const description = "A high quality Service UI components Library with Vue.js";
459
459
  const homepage = "";
@@ -45114,8 +45114,11 @@ const _sfc_main$f = {
45114
45114
  name: "BillListPanelTable",
45115
45115
  extends: SimpleViewGrid,
45116
45116
  data() {
45117
- return {};
45117
+ return {
45118
+ userShowSummary: void 0
45119
+ };
45118
45120
  },
45121
+ watch: {},
45119
45122
  computed: {
45120
45123
  RewriteColumns() {
45121
45124
  return this.tableColumns.map((item) => {
@@ -45203,6 +45206,41 @@ const _sfc_main$f = {
45203
45206
  }
45204
45207
  },
45205
45208
  methods: {
45209
+ getSearchParam(obj, flag) {
45210
+ const result = _sfc_main$1O.methods.getSearchParam.call(this, obj, flag);
45211
+ if (result && result.summary_fld) {
45212
+ delete result.summary_fld;
45213
+ }
45214
+ return result;
45215
+ },
45216
+ refurbishSucceedDefault() {
45217
+ this.sumGroupNum = 0;
45218
+ if (this.dynamicInitData && this.dynamicInitData[this.myConfig.response]) {
45219
+ if (this.myConfig.showAll) {
45220
+ if (this.myConfig.rowAll) {
45221
+ this.dynamicInitData[this.myConfig.response].splice(0, 0, this.myConfig.rowAll);
45222
+ }
45223
+ }
45224
+ let data = [];
45225
+ if (this.myConfig.overrideData) {
45226
+ data = this.myConfig.overrideData(this.dynamicInitData[this.myConfig.response]);
45227
+ } else {
45228
+ data = this.dynamicInitData[this.myConfig.response];
45229
+ }
45230
+ if (this.dynamicInitData.sumgroups) {
45231
+ data = this.doSumgroups(data, this.dynamicInitData.sumgroups);
45232
+ }
45233
+ this.data = data;
45234
+ this.tempData = this.$Method.copy(data);
45235
+ }
45236
+ if (this.dynamicInitData.total_results !== void 0) {
45237
+ this.myConfig.pageConfig.total_results = Number(this.dynamicInitData.total_results);
45238
+ }
45239
+ this.total_summary = {};
45240
+ if (this.userShowSummary !== void 0) {
45241
+ this.myConfig.showSummary = this.userShowSummary;
45242
+ }
45243
+ },
45206
45244
  getSelection() {
45207
45245
  const selectDataList = this.$refs.table.getCheckboxRecords(true);
45208
45246
  return [...selectDataList];
@@ -45250,23 +45288,6 @@ const _sfc_main$f = {
45250
45288
  return this.myConfig.sumText;
45251
45289
  }
45252
45290
  if (this.sumFields.includes(column2.field)) {
45253
- const serverValue = this.total_summary[column2.field];
45254
- if (serverValue !== void 0) {
45255
- const columnConfig2 = this.tableColumns.find(
45256
- (c10) => c10.name === column2.field
45257
- );
45258
- const format3 = columnConfig2 == null ? void 0 : columnConfig2.format;
45259
- const notzero2 = columnConfig2 == null ? void 0 : columnConfig2.notzero;
45260
- const rawValue = serverValue === 0 ? 0 : serverValue;
45261
- const result = this.$Method.formatNumber(
45262
- rawValue,
45263
- format3,
45264
- notzero2
45265
- );
45266
- if (result === "-0.00" || result === "-0")
45267
- return "0.00";
45268
- return result;
45269
- }
45270
45291
  const sumData = this.handleSumField({
45271
45292
  list: this.tempData,
45272
45293
  field: column2.field
@@ -45276,14 +45297,14 @@ const _sfc_main$f = {
45276
45297
  );
45277
45298
  const format2 = columnConfig == null ? void 0 : columnConfig.format;
45278
45299
  const notzero = columnConfig == null ? void 0 : columnConfig.notzero;
45279
- const result2 = this.$Method.formatNumber(
45300
+ const result = this.$Method.formatNumber(
45280
45301
  sumData,
45281
45302
  format2,
45282
45303
  notzero
45283
45304
  );
45284
- if (result2 === "-0.00" || result2 === "-0")
45305
+ if (result === "-0.00" || result === "-0")
45285
45306
  return "0.00";
45286
- return result2;
45307
+ return result;
45287
45308
  }
45288
45309
  return null;
45289
45310
  })
@@ -45301,6 +45322,10 @@ const _sfc_main$f = {
45301
45322
  }
45302
45323
  },
45303
45324
  mounted() {
45325
+ },
45326
+ created() {
45327
+ var _a2;
45328
+ this.userShowSummary = (_a2 = this.config) == null ? void 0 : _a2.showSummary;
45304
45329
  }
45305
45330
  };
45306
45331
  const _hoisted_1$c = { ref: "head" };