ocpview-plus 1.2.0 → 1.2.2
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/README.md +3 -0
- package/dist/ocpviewplus.min.esm.js +14 -106
- package/dist/ocpviewplus.min.js +2 -2
- package/package.json +1 -1
- package/src/components/datebox/datebox.vue +11 -11
- package/src/components/form/baseform.vue +35 -36
- package/src/components/grid/basegrid.vue +60 -65
- package/src/components/masterplate/base.vue +11 -3
- package/src/components/masterplate/listdetails.vue +1 -142
package/README.md
CHANGED
|
@@ -453,7 +453,7 @@ common.initEview = function(ViewUI2) {
|
|
|
453
453
|
common.initAnchor(ViewUI2.Anchor);
|
|
454
454
|
};
|
|
455
455
|
const name = "ocpview-plus";
|
|
456
|
-
const version$2 = "1.
|
|
456
|
+
const version$2 = "1.2.2";
|
|
457
457
|
const title = "ocpviewPlus";
|
|
458
458
|
const description = "A high quality Service UI components Library with Vue.js";
|
|
459
459
|
const homepage = "";
|
|
@@ -26208,7 +26208,7 @@ const _sfc_main$1A = {
|
|
|
26208
26208
|
para.value = this.$Method.formatDate(this.culValue, "yyyy-MM-dd");
|
|
26209
26209
|
} else {
|
|
26210
26210
|
if (this.myConfig.format === "MM-dd") {
|
|
26211
|
-
para.value = this.$Method.formatDate(this.culValue, "
|
|
26211
|
+
para.value = this.$Method.formatDate(this.culValue, "MM-dd");
|
|
26212
26212
|
} else {
|
|
26213
26213
|
para.value = this.$Method.formatDate(this.culValue, this.myConfig.format);
|
|
26214
26214
|
}
|
|
@@ -39011,6 +39011,7 @@ const _sfc_main$K = {
|
|
|
39011
39011
|
}
|
|
39012
39012
|
this.setDictData();
|
|
39013
39013
|
this.importReset = false;
|
|
39014
|
+
console.log("---------- base \u6267\u884C\u5B8C\u6BD5");
|
|
39014
39015
|
this.$nextTick(() => {
|
|
39015
39016
|
this.importReset = true;
|
|
39016
39017
|
});
|
|
@@ -39179,6 +39180,12 @@ const _sfc_main$K = {
|
|
|
39179
39180
|
this.uiconfig,
|
|
39180
39181
|
data
|
|
39181
39182
|
);
|
|
39183
|
+
},
|
|
39184
|
+
function(data) {
|
|
39185
|
+
console.error(data);
|
|
39186
|
+
},
|
|
39187
|
+
function(data) {
|
|
39188
|
+
console.error(data);
|
|
39182
39189
|
}
|
|
39183
39190
|
);
|
|
39184
39191
|
} catch (e10) {
|
|
@@ -39238,9 +39245,12 @@ const _sfc_main$K = {
|
|
|
39238
39245
|
const fieldMap = this.buildItemMap(localItems);
|
|
39239
39246
|
serverItems.forEach((serverItem) => {
|
|
39240
39247
|
const localItem = fieldMap.get(serverItem.name);
|
|
39248
|
+
console.log(serverItem.name, localItem);
|
|
39241
39249
|
if (localItem) {
|
|
39242
|
-
console.log("\u5408\u5E76", localItem);
|
|
39250
|
+
console.log("\u5408\u5E76\u524D", localItem);
|
|
39243
39251
|
Object.assign(localItem, serverItem);
|
|
39252
|
+
console.log("merge\u540E", JSON.stringify(this.uiconfig));
|
|
39253
|
+
this.uiconfig = Object.assign({}, this.uiconfig);
|
|
39244
39254
|
}
|
|
39245
39255
|
});
|
|
39246
39256
|
},
|
|
@@ -49016,110 +49026,9 @@ const _sfc_main$r = {
|
|
|
49016
49026
|
}
|
|
49017
49027
|
this.billApprovalConfig.resources = this.myConfig.resources;
|
|
49018
49028
|
this.billApprovalConfig.classPrefix = this.myConfig.classPrefix;
|
|
49029
|
+
console.log("------------- listdetail\u6267\u884C\u5B8C\u6BD5");
|
|
49019
49030
|
},
|
|
49020
49031
|
methods: {
|
|
49021
|
-
loadDynamicConfig() {
|
|
49022
|
-
try {
|
|
49023
|
-
const modulecode = this.$Method.getUrlParam("modulecode");
|
|
49024
|
-
const postData = {
|
|
49025
|
-
modulecode,
|
|
49026
|
-
moduleid: modulecode
|
|
49027
|
-
};
|
|
49028
|
-
this.asyncPost(
|
|
49029
|
-
this.myConfig.resources,
|
|
49030
|
-
"uiconfigs.getPageConfig",
|
|
49031
|
-
postData,
|
|
49032
|
-
(data) => {
|
|
49033
|
-
if (!data || !this.myConfig) {
|
|
49034
|
-
console.log("1 \u6CA1\u6709\u914D\u7F6E\u6570\u636E");
|
|
49035
|
-
return;
|
|
49036
|
-
}
|
|
49037
|
-
this.mergeDynamicConfig(
|
|
49038
|
-
this.myConfig,
|
|
49039
|
-
data
|
|
49040
|
-
);
|
|
49041
|
-
}
|
|
49042
|
-
);
|
|
49043
|
-
} catch (e10) {
|
|
49044
|
-
console.error("\u52A8\u6001\u914D\u7F6E\u52A0\u8F7D\u5931\u8D25", e10);
|
|
49045
|
-
}
|
|
49046
|
-
},
|
|
49047
|
-
mergeDynamicConfig(localConfig, serverConfig) {
|
|
49048
|
-
if (!localConfig || !serverConfig) {
|
|
49049
|
-
console.log("1 \u6CA1\u6709\u914D\u7F6E\u6570\u636E");
|
|
49050
|
-
return;
|
|
49051
|
-
}
|
|
49052
|
-
if (localConfig.billQueryConfig.gridConfig.items && serverConfig.billQueryConfig.gridConfig.items) {
|
|
49053
|
-
this.mergeFlatItems(
|
|
49054
|
-
localConfig.billQueryConfig.gridConfig.items,
|
|
49055
|
-
serverConfig.billQueryConfig.gridConfig.items
|
|
49056
|
-
);
|
|
49057
|
-
}
|
|
49058
|
-
if (localConfig.detailConfig && serverConfig.detailConfig) {
|
|
49059
|
-
this.mergeDetailConfig(
|
|
49060
|
-
localConfig.detailConfig,
|
|
49061
|
-
serverConfig.detailConfig
|
|
49062
|
-
);
|
|
49063
|
-
}
|
|
49064
|
-
},
|
|
49065
|
-
mergeDetailConfig(localDetail, serverDetail) {
|
|
49066
|
-
if (localDetail.formsConfig.items && serverDetail.formsConfig.items) {
|
|
49067
|
-
this.mergeContainerItems(
|
|
49068
|
-
localDetail.formsConfig.items,
|
|
49069
|
-
serverDetail.formsConfig.items
|
|
49070
|
-
);
|
|
49071
|
-
}
|
|
49072
|
-
if (localDetail.billDetailConfig.items && serverDetail.billDetailConfig.items) {
|
|
49073
|
-
this.mergeContainerItems(
|
|
49074
|
-
localDetail.billDetailConfig.items,
|
|
49075
|
-
serverDetail.billDetailConfig.items
|
|
49076
|
-
);
|
|
49077
|
-
}
|
|
49078
|
-
},
|
|
49079
|
-
mergeContainerItems(localContainers, serverContainers) {
|
|
49080
|
-
const containerMap = this.buildItemMap(localContainers);
|
|
49081
|
-
serverContainers.forEach((serverContainer) => {
|
|
49082
|
-
const localContainer = containerMap.get(serverContainer.name);
|
|
49083
|
-
if (!localContainer) {
|
|
49084
|
-
console.log("2 \u6CA1\u6709\u914D\u7F6Elocalcontainer");
|
|
49085
|
-
return;
|
|
49086
|
-
}
|
|
49087
|
-
Object.assign(localContainer, serverContainer);
|
|
49088
|
-
if (Array.isArray(localContainer.items) && Array.isArray(serverContainer.items)) {
|
|
49089
|
-
this.mergeFlatItems(
|
|
49090
|
-
localContainer.items,
|
|
49091
|
-
serverContainer.items
|
|
49092
|
-
);
|
|
49093
|
-
}
|
|
49094
|
-
});
|
|
49095
|
-
},
|
|
49096
|
-
mergeFlatItems(localItems, serverItems) {
|
|
49097
|
-
const fieldMap = this.buildItemMap(localItems);
|
|
49098
|
-
serverItems.forEach((serverItem) => {
|
|
49099
|
-
const localItem = fieldMap.get(serverItem.name);
|
|
49100
|
-
if (localItem) {
|
|
49101
|
-
console.log("\u5408\u5E76", localItem);
|
|
49102
|
-
Object.assign(localItem, serverItem);
|
|
49103
|
-
}
|
|
49104
|
-
});
|
|
49105
|
-
},
|
|
49106
|
-
buildItemMap(items, map2 = /* @__PURE__ */ new Map()) {
|
|
49107
|
-
if (!Array.isArray(items))
|
|
49108
|
-
return map2;
|
|
49109
|
-
items.forEach((item) => {
|
|
49110
|
-
if (!item) {
|
|
49111
|
-
console.log("3 \u6CA1\u6709\u914D\u7F6E\u6570\u636E");
|
|
49112
|
-
return;
|
|
49113
|
-
}
|
|
49114
|
-
if (item.name) {
|
|
49115
|
-
map2.set(item.name, item);
|
|
49116
|
-
}
|
|
49117
|
-
if (Array.isArray(item.items)) {
|
|
49118
|
-
this.buildItemMap(item.items, map2);
|
|
49119
|
-
}
|
|
49120
|
-
});
|
|
49121
|
-
return map2;
|
|
49122
|
-
},
|
|
49123
49032
|
setLogName() {
|
|
49124
49033
|
this.logName.push({ code: this.myConfig.detailConfig.response, name: "\u4E3B\u8868" });
|
|
49125
49034
|
this.myConfig.detailConfig.formsConfig.items.forEach((el2) => {
|
|
@@ -49679,7 +49588,6 @@ const _sfc_main$r = {
|
|
|
49679
49588
|
}
|
|
49680
49589
|
},
|
|
49681
49590
|
mounted() {
|
|
49682
|
-
this.loadDynamicConfig();
|
|
49683
49591
|
let billno = this.$Method.getUrlParam("billno");
|
|
49684
49592
|
if (billno) {
|
|
49685
49593
|
let para = {};
|