ocpview-pro 0.1.2 → 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.
|
|
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 = "";
|
|
@@ -33770,6 +33770,19 @@ function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
33770
33770
|
});
|
|
33771
33771
|
}
|
|
33772
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
|
+
};
|
|
33773
33786
|
const _sfc_main$A = {
|
|
33774
33787
|
name: "mbillquerygrid",
|
|
33775
33788
|
components: { QueryBar: querybar, GridColSet },
|
|
@@ -33828,6 +33841,7 @@ const _sfc_main$A = {
|
|
|
33828
33841
|
if (el2.type === "ComboBox" && el2.codeWithName === void 0) {
|
|
33829
33842
|
el2.codeWithName = this.OmdUrl.billQueryComboBoxCodeWithName !== void 0 ? this.OmdUrl.billQueryComboBoxCodeWithName : true;
|
|
33830
33843
|
}
|
|
33844
|
+
this.injectColumnRender(el2);
|
|
33831
33845
|
});
|
|
33832
33846
|
if (this.myConfig.gridConfig.initRefresh !== void 0) {
|
|
33833
33847
|
this.initRefresh = this.myConfig.gridConfig.initRefresh;
|
|
@@ -33878,6 +33892,23 @@ const _sfc_main$A = {
|
|
|
33878
33892
|
this.setChangeGridConfig();
|
|
33879
33893
|
},
|
|
33880
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
|
+
},
|
|
33881
33912
|
initRowBtn() {
|
|
33882
33913
|
if (this.enablePermissions) {
|
|
33883
33914
|
let btns = [];
|
|
@@ -44199,6 +44230,19 @@ const _sfc_main$i = {
|
|
|
44199
44230
|
RewriteTableCellDBlclick(params) {
|
|
44200
44231
|
const { row } = params;
|
|
44201
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 {};
|
|
44202
44246
|
}
|
|
44203
44247
|
},
|
|
44204
44248
|
mounted() {
|
|
@@ -44273,6 +44317,7 @@ function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
44273
44317
|
loading: _ctx.loading,
|
|
44274
44318
|
"sort-config": { remote: true, trigger: "cell" },
|
|
44275
44319
|
"seq-config": $options.seqConfig,
|
|
44320
|
+
"cell-style": $options.cellStyleMethod,
|
|
44276
44321
|
onSortChange: $options.RewriteTableOnSortChange,
|
|
44277
44322
|
onCellDblclick: $options.RewriteTableCellDBlclick
|
|
44278
44323
|
}, createSlots({
|
|
@@ -44292,7 +44337,7 @@ function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
44292
44337
|
])
|
|
44293
44338
|
};
|
|
44294
44339
|
})
|
|
44295
|
-
]), 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"])
|
|
44296
44341
|
]),
|
|
44297
44342
|
_: 3
|
|
44298
44343
|
}),
|