ocpview-pro 0.0.6 → 0.0.9
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/ocpviewplus.min.esm.js +39 -10
- package/dist/ocpviewplus.min.js +3 -3
- package/package.json +1 -1
- package/src/components/base/ContractPrintMixins.js +13 -8
- package/src/components/masterplate/billdetailform.vue +5 -2
- package/src/components/masterplate/simpletree.vue +1 -1
- package/src/index.js +4 -0
- package/src/plugins/copyFormatRestore.js +41 -0
|
@@ -452,8 +452,8 @@ common.initEview = function(ViewUI2) {
|
|
|
452
452
|
common.initAffix(ViewUI2.Affix);
|
|
453
453
|
common.initAnchor(ViewUI2.Anchor);
|
|
454
454
|
};
|
|
455
|
-
const name = "ocpview-
|
|
456
|
-
const version$2 = "0.0.
|
|
455
|
+
const name = "ocpview-pro";
|
|
456
|
+
const version$2 = "0.0.8";
|
|
457
457
|
const title = "ocpviewPlus";
|
|
458
458
|
const description = "A high quality Service UI components Library with Vue.js";
|
|
459
459
|
const homepage = "";
|
|
@@ -38664,6 +38664,7 @@ function _sfc_render$K(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
38664
38664
|
ref: "tree",
|
|
38665
38665
|
data: _ctx.treeData,
|
|
38666
38666
|
class: normalizeClass(_ctx.myConfig.className),
|
|
38667
|
+
"onUpdate:data": _cache[1] || (_cache[1] = ($event) => _ctx.treeData = $event),
|
|
38667
38668
|
"show-checkbox": _ctx.myConfig.showCheckBox,
|
|
38668
38669
|
onOnSelectChange: _ctx.onSelectChange,
|
|
38669
38670
|
onOnCheckChange: _ctx.onCheckChange,
|
|
@@ -42596,22 +42597,24 @@ function _sfc_render$E(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
42596
42597
|
]);
|
|
42597
42598
|
}
|
|
42598
42599
|
var mBillImport = /* @__PURE__ */ _export_sfc$1(_sfc_main$H, [["render", _sfc_render$E], ["__scopeId", "data-v-c9d051ae"]]);
|
|
42600
|
+
const CONTRACT_URL_TEMPLATE = "/widgetmodelv3/#/contract-template-create?token={token}&modulecode={modulecode}&contno={contno}&billno={billno}";
|
|
42599
42601
|
var ContractPrintMixins = {
|
|
42600
42602
|
data() {
|
|
42601
42603
|
return {
|
|
42602
42604
|
ContractModalWidth: 50,
|
|
42603
42605
|
ContractModalShowType: false,
|
|
42604
42606
|
ContractModalContentShowType: false,
|
|
42605
|
-
ContractModalIframeUrl: "
|
|
42607
|
+
ContractModalIframeUrl: ""
|
|
42606
42608
|
};
|
|
42607
42609
|
},
|
|
42608
42610
|
methods: {
|
|
42609
|
-
StartContractPrint({
|
|
42611
|
+
StartContractPrint({
|
|
42612
|
+
modulecode = "",
|
|
42613
|
+
contno = "1",
|
|
42614
|
+
billno = "1"
|
|
42615
|
+
} = {}) {
|
|
42610
42616
|
const token = this.getToken();
|
|
42611
|
-
this.ContractModalIframeUrl =
|
|
42612
|
-
"{token}",
|
|
42613
|
-
token
|
|
42614
|
-
).replace("{modulecode}", modulecode).replace("{contno}", contno);
|
|
42617
|
+
this.ContractModalIframeUrl = CONTRACT_URL_TEMPLATE.replace("{token}", token).replace("{modulecode}", modulecode).replace("{contno}", contno).replace("{billno}", billno);
|
|
42615
42618
|
this.ContractModalShowType = true;
|
|
42616
42619
|
this.$nextTick(() => {
|
|
42617
42620
|
this.ContractModalContentShowType = true;
|
|
@@ -47831,7 +47834,7 @@ const _sfc_main$u = {
|
|
|
47831
47834
|
getCurlAnchorData() {
|
|
47832
47835
|
let tmp = [];
|
|
47833
47836
|
this.anchorData.forEach((el2) => {
|
|
47834
|
-
if (el2.visible) {
|
|
47837
|
+
if (el2.visible && el2.name) {
|
|
47835
47838
|
tmp.push(el2);
|
|
47836
47839
|
}
|
|
47837
47840
|
});
|
|
@@ -47892,7 +47895,7 @@ const _sfc_main$u = {
|
|
|
47892
47895
|
}
|
|
47893
47896
|
},
|
|
47894
47897
|
setShowForm(value, name2) {
|
|
47895
|
-
if (this.$refs[name2] && this.$refs[name2][0]) {
|
|
47898
|
+
if (this.$refs[name2] && this.$refs[name2][0] && this.$refs[name2][0].setShowForm) {
|
|
47896
47899
|
this.$refs[name2][0].setShowForm(value);
|
|
47897
47900
|
}
|
|
47898
47901
|
},
|
|
@@ -135704,6 +135707,31 @@ const install$1 = (app2, i18n) => {
|
|
|
135704
135707
|
app2.use(VXETableExport);
|
|
135705
135708
|
};
|
|
135706
135709
|
var VXETable = { install: install$1 };
|
|
135710
|
+
function setupCopyFormatRestore() {
|
|
135711
|
+
document.addEventListener("copy", (e10) => {
|
|
135712
|
+
let selectedText = window.getSelection().toString();
|
|
135713
|
+
selectedText = selectedText.trim();
|
|
135714
|
+
if (!selectedText.includes(","))
|
|
135715
|
+
return;
|
|
135716
|
+
const isFullFormatted = /^\d{1,3}(,\d{3})*(\.\d+)?$/.test(selectedText);
|
|
135717
|
+
const isPartialFormatted = /\d+,\d{1,3}/.test(selectedText) && !/[^\d,.]/.test(selectedText);
|
|
135718
|
+
if (!isFullFormatted && !isPartialFormatted)
|
|
135719
|
+
return;
|
|
135720
|
+
e10.preventDefault();
|
|
135721
|
+
let stripped = selectedText.replace(/,/g, "");
|
|
135722
|
+
if (stripped.endsWith(".")) {
|
|
135723
|
+
stripped = stripped.slice(0, -1);
|
|
135724
|
+
}
|
|
135725
|
+
if (stripped.startsWith(".")) {
|
|
135726
|
+
stripped = "0" + stripped;
|
|
135727
|
+
}
|
|
135728
|
+
if (!stripped || !/\d/.test(stripped)) {
|
|
135729
|
+
e10.clipboardData.setData("text/plain", selectedText);
|
|
135730
|
+
return;
|
|
135731
|
+
}
|
|
135732
|
+
e10.clipboardData.setData("text/plain", stripped);
|
|
135733
|
+
});
|
|
135734
|
+
}
|
|
135707
135735
|
const components = {
|
|
135708
135736
|
Ebutton,
|
|
135709
135737
|
Toolbar: Toolbar$2,
|
|
@@ -135793,6 +135821,7 @@ const iview = {
|
|
|
135793
135821
|
const install2 = function(app2, opts = {}) {
|
|
135794
135822
|
if (install2.installed)
|
|
135795
135823
|
return;
|
|
135824
|
+
setupCopyFormatRestore();
|
|
135796
135825
|
VXETable.install(app2);
|
|
135797
135826
|
app2.config.globalProperties.$utils = xeUtils;
|
|
135798
135827
|
common.initEview(ViewUI);
|