ocpview-pro 0.1.1 → 0.1.3

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.0";
456
+ const version$2 = "0.1.3";
457
457
  const title = "ocpviewPlus";
458
458
  const description = "A high quality Service UI components Library with Vue.js";
459
459
  const homepage = "";
@@ -10850,12 +10850,13 @@ const _sfc_main$1I = {
10850
10850
  created() {
10851
10851
  var _a2, _b2;
10852
10852
  this.myConfig = Object.assign({}, this.myConfig, this.config);
10853
- if ((_b2 = (_a2 = this == null ? void 0 : this.OmdUrl) == null ? void 0 : _a2.portalConfig) == null ? void 0 : _b2.appendixsize) {
10854
- this.fileSize = Number(this.OmdUrl.portalConfig.appendixsize) * 1024;
10855
- }
10856
10853
  if (this.myConfig.fileSize !== void 0) {
10857
10854
  this.fileSize = 1024 * Number(this.myConfig.fileSize);
10858
10855
  }
10856
+ if ((_b2 = (_a2 = this == null ? void 0 : this.OmdUrl) == null ? void 0 : _a2.portalConfig) == null ? void 0 : _b2.appendixsize) {
10857
+ this.fileSize = Number(this.OmdUrl.portalConfig.appendixsize) * 1024;
10858
+ this.myConfig.fileSize = Number(this.OmdUrl.portalConfig.appendixsize);
10859
+ }
10859
10860
  this.uploadUrl = this.myConfig.uploadfile;
10860
10861
  },
10861
10862
  methods: {
@@ -19725,10 +19726,15 @@ const _sfc_main$1l = {
19725
19726
  }
19726
19727
  },
19727
19728
  created() {
19729
+ var _a2, _b2;
19728
19730
  this.myConfig = Object.assign({}, this.myConfig, this.config);
19729
19731
  if (this.myConfig.fileSize !== void 0) {
19730
19732
  this.fileSize = 1024 * Number(this.myConfig.fileSize);
19731
19733
  }
19734
+ if ((_b2 = (_a2 = this == null ? void 0 : this.OmdUrl) == null ? void 0 : _a2.portalConfig) == null ? void 0 : _b2.appendixsize) {
19735
+ this.fileSize = Number(this.OmdUrl.portalConfig.appendixsize) * 1024;
19736
+ this.myConfig.fileSize = Number(this.OmdUrl.portalConfig.appendixsize);
19737
+ }
19732
19738
  this.uploadUrl = this.myConfig.uploadfile;
19733
19739
  },
19734
19740
  methods: {
@@ -29821,6 +29827,7 @@ const _sfc_main$J = {
29821
29827
  };
29822
29828
  },
29823
29829
  created() {
29830
+ var _a2, _b2;
29824
29831
  this.myConfig = Object.assign({}, this.myConfig, this.config);
29825
29832
  if (this.myConfig.showTitle !== void 0) {
29826
29833
  this.showTitle = this.myConfig.showTitle;
@@ -29843,6 +29850,10 @@ const _sfc_main$J = {
29843
29850
  if (this.myConfig.fileSize !== void 0) {
29844
29851
  this.fileSize = Number(this.myConfig.fileSize) * 1024;
29845
29852
  }
29853
+ if ((_b2 = (_a2 = this == null ? void 0 : this.OmdUrl) == null ? void 0 : _a2.portalConfig) == null ? void 0 : _b2.appendixsize) {
29854
+ this.fileSize = Number(this.OmdUrl.portalConfig.appendixsize) * 1024;
29855
+ this.myConfig.fileSize = Number(this.OmdUrl.portalConfig.appendixsize);
29856
+ }
29846
29857
  if (this.myConfig.notdelfile) {
29847
29858
  this.myConfig.items[0].visible = true;
29848
29859
  } else {
@@ -33759,6 +33770,19 @@ function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
33759
33770
  });
33760
33771
  }
33761
33772
  var GridColSet = /* @__PURE__ */ _export_sfc$1(_sfc_main$B, [["render", _sfc_render$y], ["__scopeId", "data-v-926ea6aa"]]);
33773
+ const columnColorConfig = {
33774
+ billstatus: {
33775
+ A: "#FA8C16",
33776
+ N: "#1677FF",
33777
+ S: "#1677FF",
33778
+ Q: "#F5222D",
33779
+ T: "#F5222D",
33780
+ W: "#FA8C16",
33781
+ X: "#00875A",
33782
+ Y: "#52C41A",
33783
+ C: "#666666"
33784
+ }
33785
+ };
33762
33786
  const _sfc_main$A = {
33763
33787
  name: "mbillquerygrid",
33764
33788
  components: { QueryBar: querybar, GridColSet },
@@ -33817,6 +33841,7 @@ const _sfc_main$A = {
33817
33841
  if (el2.type === "ComboBox" && el2.codeWithName === void 0) {
33818
33842
  el2.codeWithName = this.OmdUrl.billQueryComboBoxCodeWithName !== void 0 ? this.OmdUrl.billQueryComboBoxCodeWithName : true;
33819
33843
  }
33844
+ this.injectColumnRender(el2);
33820
33845
  });
33821
33846
  if (this.myConfig.gridConfig.initRefresh !== void 0) {
33822
33847
  this.initRefresh = this.myConfig.gridConfig.initRefresh;
@@ -33867,6 +33892,23 @@ const _sfc_main$A = {
33867
33892
  this.setChangeGridConfig();
33868
33893
  },
33869
33894
  methods: {
33895
+ injectColumnRender(el2) {
33896
+ const colorMap = columnColorConfig[el2.name];
33897
+ if (!colorMap || el2.type !== "ComboBox" || el2.render !== void 0) {
33898
+ return;
33899
+ }
33900
+ const fieldName = el2.name;
33901
+ el2.render = (h10, params) => {
33902
+ const code = params.row[fieldName];
33903
+ const color2 = colorMap[code];
33904
+ const text = this.$Method.formatComboBox(code, params.column);
33905
+ if (color2) {
33906
+ return h10("span", { style: { color: color2 } }, text);
33907
+ }
33908
+ return h10("span", text);
33909
+ };
33910
+ el2._colorMap = colorMap;
33911
+ },
33870
33912
  initRowBtn() {
33871
33913
  if (this.enablePermissions) {
33872
33914
  let btns = [];
@@ -36130,6 +36172,7 @@ const _sfc_main$v = {
36130
36172
  };
36131
36173
  },
36132
36174
  created() {
36175
+ var _a2, _b2;
36133
36176
  this.myConfig = Object.assign({}, this.myConfig, this.config);
36134
36177
  if (this.myConfig.showTitle !== void 0) {
36135
36178
  this.showTitle = this.myConfig.showTitle;
@@ -36150,6 +36193,10 @@ const _sfc_main$v = {
36150
36193
  if (this.myConfig.fileSize !== void 0) {
36151
36194
  this.fileSize = Number(this.myConfig.fileSize) * 1024;
36152
36195
  }
36196
+ if ((_b2 = (_a2 = this == null ? void 0 : this.OmdUrl) == null ? void 0 : _a2.portalConfig) == null ? void 0 : _b2.appendixsize) {
36197
+ this.fileSize = Number(this.OmdUrl.portalConfig.appendixsize) * 1024;
36198
+ this.myConfig.fileSize = Number(this.OmdUrl.portalConfig.appendixsize);
36199
+ }
36153
36200
  if (this.myConfig.uploadfile.indexOf("?") != -1) {
36154
36201
  this.uploadfile = this.myConfig.uploadfile + "&token=" + this.getToken();
36155
36202
  } else {
@@ -44183,6 +44230,19 @@ const _sfc_main$i = {
44183
44230
  RewriteTableCellDBlclick(params) {
44184
44231
  const { row } = params;
44185
44232
  this.dbclick(row);
44233
+ },
44234
+ cellStyleMethod({ row, column: column2 }) {
44235
+ const item = this.tableColumns.find(
44236
+ (c10) => c10.name === column2.field
44237
+ );
44238
+ if (item && item._colorMap) {
44239
+ const code = row[column2.field];
44240
+ const color2 = item._colorMap[code];
44241
+ if (color2) {
44242
+ return { color: color2 };
44243
+ }
44244
+ }
44245
+ return {};
44186
44246
  }
44187
44247
  },
44188
44248
  mounted() {
@@ -44257,6 +44317,7 @@ function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
44257
44317
  loading: _ctx.loading,
44258
44318
  "sort-config": { remote: true, trigger: "cell" },
44259
44319
  "seq-config": $options.seqConfig,
44320
+ "cell-style": $options.cellStyleMethod,
44260
44321
  onSortChange: $options.RewriteTableOnSortChange,
44261
44322
  onCellDblclick: $options.RewriteTableCellDBlclick
44262
44323
  }, createSlots({
@@ -44276,7 +44337,7 @@ function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
44276
44337
  ])
44277
44338
  };
44278
44339
  })
44279
- ]), 1032, ["columns", "data", "height", "max-height", "loading", "seq-config", "onSortChange", "onCellDblclick"])
44340
+ ]), 1032, ["columns", "data", "height", "max-height", "loading", "seq-config", "cell-style", "onSortChange", "onCellDblclick"])
44280
44341
  ]),
44281
44342
  _: 3
44282
44343
  }),