From c51f5e007a3e03c9d6731ab7f28f0080de009990 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 17 十一月 2021 18:38:32 +0800 Subject: [PATCH] 2021-11-17 --- package-lock.json | 220 ++++++------ src/tabviews/formtab/actionList/index.jsx | 1 src/components/header/index.jsx | 48 +- src/tabviews/zshare/actionList/popupbutton/index.jsx | 9 src/templates/comtableconfig/index.jsx | 91 +---- src/tabviews/zshare/actionList/excelInbutton/index.jsx | 15 src/components/mkIcon/index.scss | 12 src/tabviews/zshare/actionList/exceloutbutton/index.jsx | 4 src/locales/zh-CN/model.js | 2 src/locales/en-US/model.js | 2 src/tabviews/zshare/actionList/newpagebutton/index.jsx | 9 src/tabviews/subtable/index.jsx | 6 src/tabviews/subtabtable/index.jsx | 100 ++++- src/tabviews/commontable/index.jsx | 8 src/tabviews/zshare/actionList/normalbutton/index.jsx | 41 +- src/templates/formtabconfig/index.scss | 1 src/tabviews/zshare/actionList/changeuserbutton/index.jsx | 9 src/tabviews/custom/components/card/data-card/index.jsx | 6 src/templates/sharecomponent/fieldscomponent/editcard/index.scss | 3 src/tabviews/custom/components/card/cardcellList/index.jsx | 7 src/tabviews/zshare/actionList/tabbutton/index.jsx | 9 src/templates/zshare/formconfig.jsx | 127 +++---- src/menu/components/share/actioncomponent/formconfig.jsx | 63 ++- src/templates/sharecomponent/actioncomponent/actionform/index.jsx | 62 +- src/tabviews/custom/components/table/normal-table/index.jsx | 8 src/templates/formtabconfig/actionform/index.jsx | 92 +++- src/components/mkIcon/index.jsx | 2 src/tabviews/zshare/actionList/printbutton/index.jsx | 32 + src/menu/components/share/actioncomponent/actionform/index.jsx | 4 package.json | 4 30 files changed, 542 insertions(+), 455 deletions(-) diff --git a/package-lock.json b/package-lock.json index 117451b..1c2efcb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -118,26 +118,19 @@ "tslib": "^2.0.3" }, "dependencies": { - "@antv/util": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/@antv/util/-/util-2.0.13.tgz", - "integrity": "sha512-mfYL7K8XJIeDmal33K+6abr8Yb526YXKg5XQlddNo+X1Doll+gun6HxnbdySoLv21vW4bLkcbVPjqxWl7ZJAFA==", - "requires": { - "tslib": "^2.0.3" - } - }, "tslib": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", - "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==" + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" } } }, "@antv/component": { - "version": "0.8.11", - "resolved": "https://registry.npmjs.org/@antv/component/-/component-0.8.11.tgz", - "integrity": "sha512-7hl7IPPF/QmE25lrZhppEW8BYJzU3SE6IGq4/NhrvcDk79Xhm1L4KOcAAcZ0zYBRaOwQL3yMcraIL+/Z1UhLjw==", + "version": "0.8.20", + "resolved": "https://registry.npmjs.org/@antv/component/-/component-0.8.20.tgz", + "integrity": "sha512-IaxnxS18GkbCJEpQBulVNHqreXeGsi9lIh7Es5DKm7QW61NxUmd/F25n3MneEEsZuOn/uTIT2HSROxxewqWN3w==", "requires": { + "@antv/color-util": "^2.0.3", "@antv/dom-util": "~2.0.1", "@antv/g-base": "0.5.6", "@antv/matrix-util": "^3.1.0-beta.1", @@ -148,10 +141,28 @@ "tslib": "^2.0.3" }, "dependencies": { + "@antv/g-base": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/@antv/g-base/-/g-base-0.5.6.tgz", + "integrity": "sha512-szxqFQ/xdCnfaeSEEC2kVjXdKxJnvKKJNT0MvaOG3UXOfsjPDLgb3IKLr+bU3sLvTAQfPhsbtYh7mWb03+mGjA==", + "requires": { + "@antv/event-emitter": "^0.1.1", + "@antv/g-math": "^0.1.6", + "@antv/matrix-util": "^3.1.0-beta.1", + "@antv/path-util": "~2.0.5", + "@antv/util": "~2.0.0", + "@types/d3-timer": "^2.0.0", + "d3-ease": "^1.0.5", + "d3-interpolate": "^1.3.2", + "d3-timer": "^1.0.9", + "detect-browser": "^5.1.0", + "tslib": "^2.0.3" + } + }, "tslib": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", - "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==" + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" } } }, @@ -165,18 +176,10 @@ "tslib": "^2.1.0" }, "dependencies": { - "@antv/util": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/@antv/util/-/util-2.0.13.tgz", - "integrity": "sha512-mfYL7K8XJIeDmal33K+6abr8Yb526YXKg5XQlddNo+X1Doll+gun6HxnbdySoLv21vW4bLkcbVPjqxWl7ZJAFA==", - "requires": { - "tslib": "^2.0.3" - } - }, "tslib": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", - "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==" + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" } } }, @@ -212,9 +215,9 @@ }, "dependencies": { "tslib": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", - "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==" + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" } } }, @@ -224,9 +227,9 @@ "integrity": "sha512-6C6NJOdoNVptCr5y9BVOhKkCgW7LFs/SpcRyAExUeSjAm0zJqcqNkSIRGsXYhj4PJI+CZICHzGwwiSnIsE68Ug==" }, "@antv/g-base": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/@antv/g-base/-/g-base-0.5.6.tgz", - "integrity": "sha512-szxqFQ/xdCnfaeSEEC2kVjXdKxJnvKKJNT0MvaOG3UXOfsjPDLgb3IKLr+bU3sLvTAQfPhsbtYh7mWb03+mGjA==", + "version": "0.5.9", + "resolved": "https://registry.npmjs.org/@antv/g-base/-/g-base-0.5.9.tgz", + "integrity": "sha512-IAzuCLRmz9cKCWUKR3cKWgLZ/6OQYpTCIOgxAP8Bc+HRw0mu8iC3OTz+tWKGv9L8unpvCvpQd1H+OTTjdg/TpQ==", "requires": { "@antv/event-emitter": "^0.1.1", "@antv/g-math": "^0.1.6", @@ -242,16 +245,16 @@ }, "dependencies": { "tslib": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", - "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==" + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" } } }, "@antv/g-canvas": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/@antv/g-canvas/-/g-canvas-0.5.6.tgz", - "integrity": "sha512-r6f6KqYuNZWunf2Vnf1ACopn8aic6TBFhaN3XuckenhQNqR+/PI/4Mft7z14zo7WH58X2Xs2Npq9awJXBEUzaw==", + "version": "0.5.12", + "resolved": "https://registry.npmjs.org/@antv/g-canvas/-/g-canvas-0.5.12.tgz", + "integrity": "sha512-iJ/muwwqCCNONVlPIzv/7OL5iLguaKRj2BxNMytUO3TWwamM+kHkiyYEOkS0dPn9h/hBsHYlLUluSVz2Fp6/bw==", "requires": { "@antv/g-base": "^0.5.3", "@antv/g-math": "^0.1.6", @@ -263,9 +266,9 @@ }, "dependencies": { "tslib": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", - "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==" + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" } } }, @@ -291,38 +294,38 @@ }, "dependencies": { "tslib": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", - "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==" + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" } } }, "@antv/g2": { - "version": "4.1.14", - "resolved": "https://registry.npmjs.org/@antv/g2/-/g2-4.1.14.tgz", - "integrity": "sha512-JdU+0suxkDqjTZNyG915zQ7eM+bdT2fHV48VGc1LvCroUHzCncCnbx5HZ19aZhvuij2hM6eh52vb8mwIXIzMBw==", + "version": "4.1.34", + "resolved": "https://registry.npmjs.org/@antv/g2/-/g2-4.1.34.tgz", + "integrity": "sha512-/UzyW1ZnE8Bw9zekyu1ZDcSxoFMKMHbRdru/SfZpnIfqRauF28HE3OluEetZq/JE8P5trEwnmPSJkMOnUNkCOw==", "requires": { "@antv/adjust": "^0.2.1", "@antv/attr": "^0.3.1", "@antv/color-util": "^2.0.2", - "@antv/component": "^0.8.7", + "@antv/component": "^0.8.19", "@antv/coord": "^0.3.0", "@antv/dom-util": "^2.0.2", "@antv/event-emitter": "~0.1.0", - "@antv/g-base": "0.5.6", - "@antv/g-canvas": "0.5.6", - "@antv/g-svg": "0.5.6", - "@antv/matrix-util": "^3.1.0-beta.1", - "@antv/path-util": "^2.0.3", - "@antv/scale": "^0.3.7", + "@antv/g-base": "~0.5.6", + "@antv/g-canvas": "~0.5.10", + "@antv/g-svg": "~0.5.6", + "@antv/matrix-util": "^3.1.0-beta.3", + "@antv/path-util": "^2.0.15", + "@antv/scale": "^0.3.14", "@antv/util": "~2.0.5", "tslib": "^2.0.0" }, "dependencies": { "tslib": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", - "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==" + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" } } }, @@ -335,60 +338,53 @@ } }, "@antv/matrix-util": { - "version": "3.1.0-beta.2", - "resolved": "https://registry.npmjs.org/@antv/matrix-util/-/matrix-util-3.1.0-beta.2.tgz", - "integrity": "sha512-Efwp0ZHxVDK/8RUa/RRWN7HKFHJmjn7Oq5HaNBbCmsxd7JTla3Zsoq1AZrjWMDlq0lplo77urclwI+XIW8NEHw==", + "version": "3.1.0-beta.3", + "resolved": "https://registry.npmjs.org/@antv/matrix-util/-/matrix-util-3.1.0-beta.3.tgz", + "integrity": "sha512-W2R6Za3A6CmG51Y/4jZUM/tFgYSq7vTqJL1VD9dKrvwxS4sE0ZcXINtkp55CdyBwJ6Cwm8pfoRpnD4FnHahN0A==", "requires": { "@antv/util": "^2.0.9", - "gl-matrix": "^3.3.0", - "tslib": "^1.10.0" + "gl-matrix": "^3.4.3", + "tslib": "^2.0.3" }, "dependencies": { - "@antv/util": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/@antv/util/-/util-2.0.13.tgz", - "integrity": "sha512-mfYL7K8XJIeDmal33K+6abr8Yb526YXKg5XQlddNo+X1Doll+gun6HxnbdySoLv21vW4bLkcbVPjqxWl7ZJAFA==", - "requires": { - "tslib": "^2.0.3" - }, - "dependencies": { - "tslib": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", - "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==" - } - } + "tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" } } }, "@antv/path-util": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@antv/path-util/-/path-util-2.0.9.tgz", - "integrity": "sha512-kunEz4dNheQMVn4rVFsoBDx+n9Knfi3uRLvDk9SojZAqpninsjFhdoiYtbExwJGz1FYGtiV10Y6N1tp73kZFcg==", + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@antv/path-util/-/path-util-2.0.15.tgz", + "integrity": "sha512-R2VLZ5C8PLPtr3VciNyxtjKqJ0XlANzpFb5sE9GE61UQqSRuSVSzIakMxjEPrpqbgc+s+y8i+fmc89Snu7qbNw==", "requires": { + "@antv/matrix-util": "^3.0.4", "@antv/util": "^2.0.9", "tslib": "^2.0.3" }, "dependencies": { - "@antv/util": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/@antv/util/-/util-2.0.13.tgz", - "integrity": "sha512-mfYL7K8XJIeDmal33K+6abr8Yb526YXKg5XQlddNo+X1Doll+gun6HxnbdySoLv21vW4bLkcbVPjqxWl7ZJAFA==", + "@antv/matrix-util": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@antv/matrix-util/-/matrix-util-3.0.4.tgz", + "integrity": "sha512-BAPyu6dUliHcQ7fm9hZSGKqkwcjEDVLVAstlHULLvcMZvANHeLXgHEgV7JqcAV/GIhIz8aZChIlzM1ZboiXpYQ==", "requires": { + "@antv/util": "^2.0.9", + "gl-matrix": "^3.3.0", "tslib": "^2.0.3" } }, "tslib": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", - "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==" + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" } } }, "@antv/scale": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@antv/scale/-/scale-0.3.9.tgz", - "integrity": "sha512-m56Rs4Zta7XnuF+aNbJXMsgBqATO1M4kvu+dEmhzLYsPK5D3dHpJTOGh/Zy55eirekb9F7jiu29SJqPNnhxq+g==", + "version": "0.3.14", + "resolved": "https://registry.npmjs.org/@antv/scale/-/scale-0.3.14.tgz", + "integrity": "sha512-G19Mh9VYPX/Z5PXKJrORIYCjrA+Fmko6ZB4HN6Y8K0T9FeKaSJq+idIe7AUJhIIXDCrFk4LzW+t908NsORqxPg==", "requires": { "@antv/util": "~2.0.3", "fecha": "~4.2.0", @@ -396,24 +392,30 @@ }, "dependencies": { "tslib": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", - "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==" + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" } } }, "@antv/util": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/@antv/util/-/util-2.0.13.tgz", - "integrity": "sha512-mfYL7K8XJIeDmal33K+6abr8Yb526YXKg5XQlddNo+X1Doll+gun6HxnbdySoLv21vW4bLkcbVPjqxWl7ZJAFA==", + "version": "2.0.17", + "resolved": "https://registry.npmjs.org/@antv/util/-/util-2.0.17.tgz", + "integrity": "sha512-o6I9hi5CIUvLGDhth0RxNSFDRwXeywmt6ExR4+RmVAzIi48ps6HUy+svxOCayvrPBN37uE6TAc2KDofRo0nK9Q==", "requires": { + "csstype": "^3.0.8", "tslib": "^2.0.3" }, "dependencies": { + "csstype": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.10.tgz", + "integrity": "sha512-2u44ZG2OcNUO9HDp/Jl8C07x6pU/eTR3ncV91SiK3dhG9TWvRVsCoJw14Ckx5DgWkzGA3waZWO3d7pgqpUI/XA==" + }, "tslib": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", - "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==" + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" } } }, @@ -2535,9 +2537,9 @@ "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==" }, "@types/d3-timer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@types/d3-timer/-/d3-timer-2.0.0.tgz", - "integrity": "sha512-l6stHr1VD1BWlW6u3pxrjLtJfpPZq9I3XmKIQtq7zHM/s6fwEtI1Yn6Sr5/jQTrUDCC5jkS6gWqlFGCDArDqNg==" + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/d3-timer/-/d3-timer-2.0.1.tgz", + "integrity": "sha512-TF8aoF5cHcLO7W7403blM7L1T+6NF3XMyN3fxyUolq2uOcFeicG/khQg/dGxiCJWoAcmYulYN7LYSRKO54IXaA==" }, "@types/eslint-visitor-keys": { "version": "1.0.0", @@ -6168,9 +6170,9 @@ "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" }, "detect-browser": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/detect-browser/-/detect-browser-5.2.0.tgz", - "integrity": "sha512-tr7XntDAu50BVENgQfajMLzacmSe34D+qZc4zjnniz0ZVuw/TZcLcyxHQjYpJTM36sGEkZZlYLnIM1hH7alTMA==" + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/detect-browser/-/detect-browser-5.2.1.tgz", + "integrity": "sha512-eAcRiEPTs7utXWPaAgu/OX1HRJpxW7xSHpw4LTDrGFaeWnJ37HRlqpUkKsDm0AoTbtrvHQhH+5U2Cd87EGhJTg==" }, "detect-indent": { "version": "4.0.0", @@ -9717,9 +9719,9 @@ } }, "gl-matrix": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/gl-matrix/-/gl-matrix-3.3.0.tgz", - "integrity": "sha512-COb7LDz+SXaHtl/h4LeaFcNdJdAQSDeVqjiIihSXNrkWObZLhDI4hIkZC11Aeqp7bcE72clzB0BnDXr2SmslRA==" + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/gl-matrix/-/gl-matrix-3.4.3.tgz", + "integrity": "sha512-wcCp8vu8FT22BnvKVPjXa/ICBWRq/zjFfdofZy1WSpQZpphblv12/bOQLBC1rMM7SGOFS9ltVmKOHil5+Ml7gA==" }, "glob": { "version": "7.1.4", diff --git a/package.json b/package.json index 5ed39dd..3cd5c8f 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,8 @@ "dependencies": { "@ant-design/icons": "^4.6.2", "@antv/data-set": "^0.11.4", - "@antv/g2": "^4.1.14", - "@antv/util": "^2.0.13", + "@antv/g2": "^4.1.34", + "@antv/util": "^2.0.17", "@babel/core": "7.5.5", "@svgr/webpack": "4.3.2", "@typescript-eslint/eslint-plugin": "1.13.0", diff --git a/src/components/header/index.jsx b/src/components/header/index.jsx index 7ab5709..952e442 100644 --- a/src/components/header/index.jsx +++ b/src/components/header/index.jsx @@ -142,31 +142,33 @@ // 鑾峰彇瑙掕壊鏉冮檺 let roledefer = new Promise(resolve => { // edition_type 鎺ュ彛鐗堟湰鎺у埗 ''銆�'Y'銆�'A' - Api.getSystemConfig({ - func: 's_Get_TrdMenu_Role', - edition_type: 'A', - pro_sys: window.GLOB.systemType === 'production' ? 'Y' : '' - }).then(result => { - let _permAction = {loaded: true} // 鎸夐挳鏉冮檺 - - if (result && result.status) { - if (result.UserRoles_Menu) { - result.UserRoles_Menu.forEach(menu => { - if (!menu.MenuID) return - _permAction[menu.MenuID] = true + setTimeout(() => { + Api.getSystemConfig({ + func: 's_Get_TrdMenu_Role', + edition_type: 'A', + pro_sys: window.GLOB.systemType === 'production' ? 'Y' : '' + }).then(result => { + let _permAction = {loaded: true} // 鎸夐挳鏉冮檺 + + if (result && result.status) { + if (result.UserRoles_Menu) { + result.UserRoles_Menu.forEach(menu => { + if (!menu.MenuID) return + _permAction[menu.MenuID] = true + }) + } + } else if (result) { + notification.error({ + top: 92, + message: result.message, + duration: 10 }) } - } else if (result) { - notification.error({ - top: 92, - message: result.message, - duration: 10 - }) - } - - this.props.initActionPermission(_permAction) - resolve() - }) + + this.props.initActionPermission(_permAction) + resolve() + }) + }, 50) }) // 鑾峰彇涓昏彍鍗曞弬鏁� diff --git a/src/components/mkIcon/index.jsx b/src/components/mkIcon/index.jsx index 5a3627c..c1c7c13 100644 --- a/src/components/mkIcon/index.jsx +++ b/src/components/mkIcon/index.jsx @@ -43,7 +43,7 @@ <div className="mk-icon-box"> {selectIcon ? <Icon type={selectIcon}/> : <Icon style={{opacity: 0}} type="plus"/>} <Icon className="trigger" onClick={() => this.setState({visible: true})} type="swap"/> - {allowClear && selectIcon ? <Icon className="close" onClick={() => this.checkIcon('')} type="close"/> : null} + {allowClear && selectIcon ? <Icon className="close" onClick={() => this.checkIcon('')} theme="filled" type="close-circle"/> : null} <Modal wrapClassName="popview-modal mk-icon-wrap" title={'鍥炬爣閫夋嫨'} diff --git a/src/components/mkIcon/index.scss b/src/components/mkIcon/index.scss index 4ba05ef..0cc28b6 100644 --- a/src/components/mkIcon/index.scss +++ b/src/components/mkIcon/index.scss @@ -14,13 +14,11 @@ } .close.anticon { float: right; - margin-top: 6px; - margin-right: 5px; - background: #efefef; - border-radius: 50%; - color: #757575; - padding: 3px; - font-size: 10px; + margin-top: 8px; + margin-right: 8px; + background: #fff; + color: rgba(0, 0, 0, 0.45); + font-size: 12px; opacity: 0; transition: opacity 0.3s; } diff --git a/src/locales/en-US/model.js b/src/locales/en-US/model.js index 6eb3569..ea0c882 100644 --- a/src/locales/en-US/model.js +++ b/src/locales/en-US/model.js @@ -210,8 +210,6 @@ 'model.status.forbidden': '绂佺敤', 'model.status.open': '鍚敤', 'header.form.readin': '鑷姩濉厖', - 'header.form.afterExecSuccess': '鎴愬姛鍚�', - 'header.form.afterExecError': '澶辫触鍚�', 'header.form.pagination': '鍒嗛〉', 'header.form.regular': '姝e垯鏍¢獙', 'header.form.quickadd': '蹇嵎娣诲姞', diff --git a/src/locales/zh-CN/model.js b/src/locales/zh-CN/model.js index 6e111a9..cddbf3b 100644 --- a/src/locales/zh-CN/model.js +++ b/src/locales/zh-CN/model.js @@ -210,8 +210,6 @@ 'model.status.forbidden': '绂佺敤', 'model.status.open': '鍚敤', 'header.form.readin': '鑷姩濉厖', - 'header.form.afterExecSuccess': '鎴愬姛鍚�', - 'header.form.afterExecError': '澶辫触鍚�', 'header.form.pagination': '鍒嗛〉', 'header.form.regular': '姝e垯鏍¢獙', 'header.form.quickadd': '蹇嵎娣诲姞', diff --git a/src/menu/components/share/actioncomponent/actionform/index.jsx b/src/menu/components/share/actioncomponent/actionform/index.jsx index 3636575..2bc9602 100644 --- a/src/menu/components/share/actioncomponent/actionform/index.jsx +++ b/src/menu/components/share/actioncomponent/actionform/index.jsx @@ -182,7 +182,7 @@ } } else if (_opentype === 'funcbutton') { if (_funcType === 'print') { - _options.push('execMode', 'intertype', 'Ot', 'execSuccess', 'execError', 'resetPageIndex', 'controlField', 'controlVal') + _options.push('execMode', 'intertype', 'Ot', 'execSuccess', 'execError', 'resetPageIndex') if (_intertype === 'outer') { _options.push('innerFunc', 'sysInterface', 'interface', 'proInterface', 'outerFunc', 'callbackFunc') } else if (_intertype === 'inner') { @@ -215,7 +215,7 @@ } } - if (_Ot !== 'notRequired' && _opentype !== 'excelOut' && _opentype !== 'funcbutton') { + if (_Ot !== 'notRequired' && _opentype !== 'excelOut') { _options.push('controlField', 'controlVal') } if (_Ot === 'requiredSgl' && ['pop', 'prompt', 'exec'].includes(_opentype)) { diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx index 42d604e..c33334e 100644 --- a/src/menu/components/share/actioncomponent/formconfig.jsx +++ b/src/menu/components/share/actioncomponent/formconfig.jsx @@ -141,6 +141,10 @@ }) } + if (!card.control && card.controlField) { + card.control = 'disabled' + } + let forms = [ { type: 'select', @@ -384,6 +388,9 @@ value: 'grid', text: '鍒锋柊褰撳墠缁勪欢' }, { + value: 'line', + text: '鍒锋柊琛�' + }, { value: 'mainline', text: '鍒锋柊涓婄骇缁勪欢 - 琛�' }, { @@ -405,6 +412,9 @@ }, { value: 'grid', text: '鍒锋柊褰撳墠缁勪欢' + }, { + value: 'line', + text: '鍒锋柊琛�' }, { value: 'mainline', text: '鍒锋柊涓婄骇缁勪欢 - 琛�' @@ -584,24 +594,6 @@ options: menulist }, { - type: 'select', - key: 'controlField', - label: '鎺у埗瀛楁', - tooltip: '绂佺敤鎺у埗瀛楁锛屽彲鏍规嵁鏁版嵁鎺у埗鎸夐挳鏄惁绂佺敤銆�', - initVal: card.controlField || '', - required: false, - allowClear: true, - options: columns - }, - { - type: 'text', - key: 'controlVal', - label: '鎺у埗鍊�', - tooltip: '褰撻�夋嫨鎺у埗瀛楁锛屼笖瀛楁鍊间笌鎺у埗鍊肩浉绛夋椂锛屾寜閽細绂佺敤锛屽涓�肩敤閫楀彿鍒嗛殧銆�', - initVal: card.controlVal || '', - required: false - }, - { type: 'cascader', key: 'linkmenu', label: Formdict['model.form.linkmenu'], @@ -706,6 +698,41 @@ text: '鍒锋柊' }] }, + { + type: 'radio', + key: 'control', + label: '鎸夐挳鎺у埗', + initVal: card.control || (card.controlField ? 'disabled' : ''), + required: false, + options: [{ + value: '', + text: '鏃�' + }, { + value: 'disabled', + text: '绂佺敤' + }, { + value: 'hidden', + text: '闅愯棌' + }] + }, + { + type: 'select', + key: 'controlField', + label: '鎺у埗瀛楁', + tooltip: '鎺у埗瀛楁锛屽彲鏍规嵁鏁版嵁鎺у埗鎸夐挳鐨勯殣钘忔垨绂佺敤銆�', + initVal: card.controlField || '', + required: true, + allowClear: true, + options: columns + }, + { + type: 'text', + key: 'controlVal', + label: '鎺у埗鍊�', + tooltip: '褰撻�夋嫨鎺у埗瀛楁锛屼笖瀛楁鍊间笌鎺у埗鍊肩浉绛夋椂锛屾寜閽細闅愯棌鎴栫鐢紝澶氫釜鍊肩敤閫楀彿鍒嗛殧銆�', + initVal: card.controlVal || '', + required: false + }, ] return forms diff --git a/src/tabviews/commontable/index.jsx b/src/tabviews/commontable/index.jsx index 8860f88..a330fc1 100644 --- a/src/tabviews/commontable/index.jsx +++ b/src/tabviews/commontable/index.jsx @@ -1054,12 +1054,16 @@ * @param {*} position // 鍒锋柊浣嶇疆 * @param {*} btn // 鎵ц鐨勬寜閽� */ - refreshByButtonResult = (menuId, position, btn) => { + refreshByButtonResult = (menuId, position, btn, id, lines) => { const { MenuID } = this.props if (MenuID !== menuId) return - this.reloadtable(btn) + if (position === 'line' && lines && lines.length === 1) { + this.loadmainLinedata(lines[0].$$uuid) + } else { + this.reloadtable(btn) + } } UNSAFE_componentWillMount () { diff --git a/src/tabviews/custom/components/card/cardcellList/index.jsx b/src/tabviews/custom/components/card/cardcellList/index.jsx index cfd30dd..a1160b1 100644 --- a/src/tabviews/custom/components/card/cardcellList/index.jsx +++ b/src/tabviews/custom/components/card/cardcellList/index.jsx @@ -639,6 +639,13 @@ </Col> ) } else if (card.eleType === 'button') { + if (card.control === 'hidden') { + let s = data[card.controlField] + if (s === card.controlVal || (card.controlVal && card.controlVal.split(',').includes(s))) { + return null + } + } + let _data = [data] if (data.$$type === 'extendCard' || data.$$empty) { diff --git a/src/tabviews/custom/components/card/data-card/index.jsx b/src/tabviews/custom/components/card/data-card/index.jsx index 8ee0d13..5b91693 100644 --- a/src/tabviews/custom/components/card/data-card/index.jsx +++ b/src/tabviews/custom/components/card/data-card/index.jsx @@ -226,12 +226,14 @@ * @param {*} position // 鍒锋柊浣嶇疆 * @param {*} btn // 鎵ц鐨勬寜閽� */ - refreshByButtonResult = (menuId, position, btn) => { + refreshByButtonResult = (menuId, position, btn, id, lines) => { const { config, BID } = this.state if (config.uuid !== menuId) return - if (!btn || btn.resetPageIndex !== 'false') { + if (position === 'line' && lines && lines.length === 1) { + this.loadLinedata(lines[0].$$uuid) + } else if (!btn || btn.resetPageIndex !== 'false') { this.setState({ pageIndex: 1 }, () => { diff --git a/src/tabviews/custom/components/table/normal-table/index.jsx b/src/tabviews/custom/components/table/normal-table/index.jsx index dd7f4d0..2f53d2c 100644 --- a/src/tabviews/custom/components/table/normal-table/index.jsx +++ b/src/tabviews/custom/components/table/normal-table/index.jsx @@ -504,12 +504,16 @@ * @param {*} position // 鍒锋柊浣嶇疆 * @param {*} btn // 鎵ц鐨勬寜閽� */ - refreshByButtonResult = (menuId, position, btn) => { + refreshByButtonResult = (menuId, position, btn, id, lines) => { const { config, BID } = this.state if (config.uuid !== menuId) return - this.reloadtable(btn) // 鏁版嵁鍒锋柊 + if (position === 'line' && lines && lines.length === 1) { + this.loadmainLinedata(lines[0].$$uuid) + } else { + this.reloadtable(btn) // 鏁版嵁鍒锋柊 + } if (btn.syncComponentId && btn.syncComponentId !== config.uuid && btn.syncComponentId !== config.setting.supModule) { MKEmitter.emit('reloadData', btn.syncComponentId) // 鍚岀骇鏍囩鍒锋柊 diff --git a/src/tabviews/formtab/actionList/index.jsx b/src/tabviews/formtab/actionList/index.jsx index ac97ecd..17b6493 100644 --- a/src/tabviews/formtab/actionList/index.jsx +++ b/src/tabviews/formtab/actionList/index.jsx @@ -24,7 +24,6 @@ state = { formdata: null, - tabledata: null, loadingUuid: '' } diff --git a/src/tabviews/subtable/index.jsx b/src/tabviews/subtable/index.jsx index d14a6c6..acb7ec1 100644 --- a/src/tabviews/subtable/index.jsx +++ b/src/tabviews/subtable/index.jsx @@ -890,7 +890,7 @@ * @param {*} position // 鍒锋柊浣嶇疆 * @param {*} btn // 鎵ц鐨勬寜閽� */ - refreshByButtonResult = (menuId, position, btn) => { + refreshByButtonResult = (menuId, position, btn, id, lines) => { const { MenuID } = this.props if (MenuID !== menuId) return @@ -898,7 +898,9 @@ const { Tab, SupMenuID } = this.props const { BID } = this.state - if (position === 'grid' || position === 'view') { + if (position === 'line' && lines && lines.length === 1) { + this.loadmainLinedata(lines[0].$$uuid) + } else if (position === 'grid' || position === 'view') { this.reloadtable(btn) } else if (position === 'maingrid' || position === 'mainline') { this.reloadtable(btn) diff --git a/src/tabviews/subtabtable/index.jsx b/src/tabviews/subtabtable/index.jsx index 68ab680..c3d2df2 100644 --- a/src/tabviews/subtabtable/index.jsx +++ b/src/tabviews/subtabtable/index.jsx @@ -28,7 +28,6 @@ BID: PropTypes.string, // 涓婄骇鏁版嵁ID BData: PropTypes.any, // 涓婄骇鏁版嵁 MenuID: PropTypes.string, // 鑿滃崟Id - mainSearch: PropTypes.any, // 涓昏〃鎼滅储鏉′欢 SupMenuID: PropTypes.string, // 涓婄骇鑿滃崟Id } @@ -315,13 +314,9 @@ } loadData = () => { - const { mainSearch } = this.props const { setting, search, hasReqFields, loadCustomApi } = this.state let searches = fromJS(search).toJS() - if (mainSearch && mainSearch.length > 0) { // 涓昏〃鎼滅储鏉′欢 - searches = [...mainSearch, ...searches] - } if (hasReqFields) { let requireFields = searches.filter(item => item.required && item.value === '') @@ -532,13 +527,10 @@ * @description 瀛愯〃鏁版嵁鍔犺浇 */ async loadmaindata () { - const { mainSearch, BID } = this.props + const { BID } = this.props const { setting, arr_field, search, orderBy, pageIndex, pageSize, absFields } = this.state let searches = fromJS(search).toJS() - if (mainSearch && mainSearch.length > 0) { // 涓昏〃鎼滅储鏉′欢 - searches = [...mainSearch, ...searches] - } this.setState({ loading: true @@ -644,6 +636,79 @@ } /** + * @description 鑾峰彇鍗曡鏁版嵁 + */ + async loadmainLinedata (id) { + const { BID } = this.props + const { setting, arr_field, search, orderBy, pageIndex, pageSize, absFields } = this.state + + let searches = fromJS(search).toJS() + + this.setState({ + loading: true + }) + + let _orderBy = orderBy || setting.order + let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID, this.props.menuType, id) + + let result = await Api.genericInterface(param) + if (result.status) { + let data = fromJS(this.state.data).toJS() + let selectedData = fromJS(this.state.selectedData).toJS() + if (result.data && result.data[0]) { + let _data = result.data[0] || {} + + if (absFields.length) { + absFields.forEach(field => { + if (!_data[field]) return + if (isNaN(Math.abs(_data[field]))) return + + _data[field] = Math.abs(_data[field]) + }) + } + + _data.$$uuid = _data[setting.primaryKey] || '' + _data.$$BID = BID || '' + + try { + data = data.map(item => { + if (item.$$uuid === _data.$$uuid) { + _data.key = item.key + _data.$Index = item.$Index + return _data + } else { + return item + } + }) + selectedData = selectedData.map(item => { + if (_data.$$uuid === item.$$uuid) { + return _data + } + return item + }) + } catch (e) { + console.warn('鏁版嵁鏌ヨ閿欒') + } + } + + this.setState({ + data, + selectedData, + loading: false + }) + } else { + this.setState({ + loading: false + }) + notification.error({ + top: 92, + message: result.message, + duration: 10 + }) + } + } + + /** * @description 鎼滅储鏉′欢鏀瑰彉鏃讹紝閲嶇疆琛ㄦ牸鏁版嵁 * 鍚湁鍒濆涓嶅姞杞界殑椤甸潰锛屼慨鏀硅缃� */ @@ -707,20 +772,15 @@ * @description 瀵煎嚭Excel鏃讹紝鑾峰彇椤甸潰鎼滅储鎺掑簭绛夊弬鏁� */ queryModuleParam = (menuId, btnId) => { - const { Tab, mainSearch, MenuID } = this.props + const { Tab, MenuID } = this.props const { arr_field, orderBy, search, setting} = this.state if (MenuID !== menuId) return - let searches = search - if (mainSearch && mainSearch.length > 0) { // 涓昏〃鎼滅储鏉′欢 - searches = [...mainSearch, ...search] - } - MKEmitter.emit('returnModuleParam', MenuID, btnId, { arr_field: arr_field, orderBy: orderBy || setting.order, - search: searches, + search: search, menuName: Tab.label }) } @@ -731,12 +791,16 @@ * @param {*} position // 鍒锋柊浣嶇疆 * @param {*} btn // 鎵ц鐨勬寜閽� */ - refreshByButtonResult = (menuId, position, btn) => { + refreshByButtonResult = (menuId, position, btn, id, lines) => { const { MenuID } = this.props if (MenuID !== menuId) return - this.reloadtable(btn) + if (position === 'line' && lines && lines.length === 1) { + this.loadmainLinedata(lines[0].$$uuid) + } else { + this.reloadtable(btn) + } MKEmitter.emit('refreshPopButton', this.props.Tab.uuid) } diff --git a/src/tabviews/zshare/actionList/changeuserbutton/index.jsx b/src/tabviews/zshare/actionList/changeuserbutton/index.jsx index 2c856f4..4ad8b99 100644 --- a/src/tabviews/zshare/actionList/changeuserbutton/index.jsx +++ b/src/tabviews/zshare/actionList/changeuserbutton/index.jsx @@ -25,6 +25,7 @@ state = { dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, disabled: false, + hidden: false, loading: false } @@ -39,7 +40,7 @@ disabled = true } }) - this.setState({disabled}) + this.setState({disabled, hidden: disabled && btn.control === 'hidden'}) } } @@ -65,7 +66,7 @@ } }) } - this.setState({disabled}) + this.setState({disabled, hidden: disabled && btn.control === 'hidden'}) } } @@ -195,7 +196,9 @@ render() { const { btn, show } = this.props - const { loading, disabled } = this.state + const { loading, disabled, hidden } = this.state + + if (hidden) return null if (show === 'actionList') { return ( diff --git a/src/tabviews/zshare/actionList/excelInbutton/index.jsx b/src/tabviews/zshare/actionList/excelInbutton/index.jsx index 5d69148..0961633 100644 --- a/src/tabviews/zshare/actionList/excelInbutton/index.jsx +++ b/src/tabviews/zshare/actionList/excelInbutton/index.jsx @@ -28,7 +28,9 @@ state = { dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, loading: false, + selines: null, disabled: false, + hidden: false, primaryId: '', } @@ -43,7 +45,7 @@ disabled = true } }) - this.setState({disabled}) + this.setState({disabled, hidden: disabled && btn.control === 'hidden'}) } } @@ -69,7 +71,7 @@ } }) } - this.setState({disabled}) + this.setState({disabled, hidden: disabled && btn.control === 'hidden'}) } } @@ -127,6 +129,7 @@ } this.setState({ + selines: data, primaryId: primaryId }, () => { this.refs.excelIn.exceltrigger() @@ -167,7 +170,7 @@ }) if (btn.execSuccess !== 'never') { - MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execSuccess, btn) + MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execSuccess, btn, '', this.state.selines) } if (btn.switchTab && btn.switchTab.length > 0) { let id = btn.switchTab[btn.switchTab.length - 1] @@ -211,7 +214,7 @@ }) if (btn.execError !== 'never') { - MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execError, btn) + MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execError, btn, '', this.state.selines) } } @@ -436,7 +439,9 @@ render() { const { btn, show } = this.props - const { loading, disabled } = this.state + const { loading, disabled, hidden } = this.state + + if (hidden) return null if (show === 'actionList') { return <div style={{display: 'inline-block'}} onClick={(e) => e.stopPropagation()}> diff --git a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx index f97310b..376dcc8 100644 --- a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx +++ b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx @@ -820,7 +820,7 @@ }) if (btn.execSuccess !== 'never') { - MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execSuccess, btn) + MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execSuccess, btn, '', []) } if (btn.switchTab && btn.switchTab.length > 0) { let id = btn.switchTab[btn.switchTab.length - 1] @@ -864,7 +864,7 @@ }) if (btn.execError !== 'never') { - MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execError, btn) + MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execError, btn, '', []) } } diff --git a/src/tabviews/zshare/actionList/newpagebutton/index.jsx b/src/tabviews/zshare/actionList/newpagebutton/index.jsx index 6a0547d..6f7b8cb 100644 --- a/src/tabviews/zshare/actionList/newpagebutton/index.jsx +++ b/src/tabviews/zshare/actionList/newpagebutton/index.jsx @@ -22,6 +22,7 @@ state = { dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, disabled: false, + hidden: false, visible: false } @@ -36,7 +37,7 @@ disabled = true } }) - this.setState({disabled}) + this.setState({disabled, hidden: disabled && btn.control === 'hidden'}) } } @@ -62,7 +63,7 @@ } }) } - this.setState({disabled}) + this.setState({disabled, hidden: disabled && btn.control === 'hidden'}) } } @@ -193,7 +194,9 @@ render() { const { btn, show } = this.props - const { disabled } = this.state + const { disabled, hidden } = this.state + + if (hidden) return null if (show === 'actionList') { return ( diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx index b811fe8..2c3b427 100644 --- a/src/tabviews/zshare/actionList/normalbutton/index.jsx +++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx @@ -37,12 +37,13 @@ dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, visible: false, formdata: null, - tabledata: null, + selines: null, confirmLoading: false, btnconfig: null, loading: false, loadingNumber: '', disabled: false, + hidden: false, checkParam: null, autoMatic: false } @@ -60,7 +61,7 @@ disabled = true } }) - this.setState({disabled}) + this.setState({disabled, hidden: disabled && btn.control === 'hidden'}) } } @@ -96,7 +97,7 @@ } }) } - this.setState({disabled}) + this.setState({disabled, hidden: disabled && btn.control === 'hidden'}) } } @@ -125,7 +126,7 @@ this.setState({ loading: true }) - this.execSubmit(this.state.tabledata, () => {}, res.form) + this.execSubmit(this.state.selines, () => {}, res.form) } resetModuleParam = (menuId, btnId, param) => { @@ -244,10 +245,11 @@ return } + this.setState({ + selines: data + }) + if (btn.OpenType === 'formSubmit') { - this.setState({ - tabledata: data - }) MKEmitter.emit('mkFormSubmit', btn.uuid) return } else if (btn.OpenType === 'prompt') { @@ -274,7 +276,6 @@ this.setState({ loading: true, - tabledata: data, btnconfig: modal }, () => { this.improveAction() @@ -1413,7 +1414,7 @@ if (btn.execSuccess === 'closetab') { MKEmitter.emit('closeTabView', btn.$MenuID) } else if (btn.execSuccess !== 'never') { - MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execSuccess, btn, id) + MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execSuccess, btn, id, this.state.selines) } if (btn.refreshTab && btn.refreshTab.length > 0) { @@ -1627,7 +1628,7 @@ visible: false }) if (btn.execError !== 'never') { - MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execError, btn) + MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execError, btn, '', this.state.selines) } } }) @@ -1645,7 +1646,7 @@ } if (btn.execError !== 'never') { - MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execError, btn) + MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execError, btn, '', this.state.selines) } } @@ -1756,7 +1757,7 @@ this.formRef.handleConfirm().then(res => { this.setState({ confirmLoading: true }) - this.execSubmit(this.state.tabledata, () => { this.setState({ confirmLoading: false }) }, res) + this.execSubmit(this.state.selines, () => { this.setState({ confirmLoading: false }) }, res) }) } @@ -1773,7 +1774,7 @@ modelconfirm = () => { const { BData } = this.props - const { btnconfig, tabledata } = this.state + const { btnconfig, selines } = this.state let _this = this let result = [] @@ -1788,8 +1789,8 @@ if (item.type === 'linkMain' && BData && BData.hasOwnProperty(item.field)) { _initval = BData[item.field] - } else if (_readin && tabledata[0] && tabledata[0].hasOwnProperty(item.field)) { - _initval = tabledata[0][item.field] + } else if (_readin && selines[0] && selines[0].hasOwnProperty(item.field)) { + _initval = selines[0][item.field] } else if (item.type === 'date' && _initval) { _initval = moment().subtract(_initval, 'days').format('YYYY-MM-DD') } else if (item.type === 'datemonth' && _initval) { @@ -1830,7 +1831,7 @@ title: this.state.dict['main.action.confirm.tip'], onOk() { return new Promise(resolve => { - _this.execSubmit(tabledata, resolve, result) + _this.execSubmit(selines, resolve, result) }) }, onCancel() { @@ -1876,7 +1877,7 @@ menuType={this.props.menuType} action={btnconfig} inputSubmit={this.handleOk} - data={this.state.tabledata[0]} + data={this.state.selines[0]} BData={BData} wrappedComponentRef={(inst) => this.formRef = inst} /> @@ -1919,7 +1920,7 @@ menuType={this.props.menuType} action={btnconfig} inputSubmit={this.handleOk} - data={this.state.tabledata[0]} + data={this.state.selines[0]} BData={BData} wrappedComponentRef={(inst) => this.formRef = inst} /> @@ -1930,7 +1931,9 @@ render() { const { btn, show, style } = this.props - const { loadingNumber, loading, disabled } = this.state + const { loadingNumber, loading, disabled, hidden } = this.state + + if (hidden) return null if (show === 'actionList') { return <div style={{display: 'inline-block'}} onClick={(e) => e.stopPropagation()}> diff --git a/src/tabviews/zshare/actionList/popupbutton/index.jsx b/src/tabviews/zshare/actionList/popupbutton/index.jsx index 0705de6..4c1fe85 100644 --- a/src/tabviews/zshare/actionList/popupbutton/index.jsx +++ b/src/tabviews/zshare/actionList/popupbutton/index.jsx @@ -31,6 +31,7 @@ popData: null, primaryId: '', disabled: false, + hidden: false, loading: false, } @@ -45,7 +46,7 @@ disabled = true } }) - this.setState({disabled}) + this.setState({disabled, hidden: disabled && btn.control === 'hidden'}) } } @@ -74,7 +75,7 @@ } }) } - this.setState({disabled}) + this.setState({disabled, hidden: disabled && btn.control === 'hidden'}) } } @@ -279,7 +280,9 @@ render() { const { btn, show } = this.props - const { loading, disabled } = this.state + const { loading, disabled, hidden } = this.state + + if (hidden) return null let label = '' let icon = '' diff --git a/src/tabviews/zshare/actionList/printbutton/index.jsx b/src/tabviews/zshare/actionList/printbutton/index.jsx index 1c76c94..ebedaf7 100644 --- a/src/tabviews/zshare/actionList/printbutton/index.jsx +++ b/src/tabviews/zshare/actionList/printbutton/index.jsx @@ -37,10 +37,11 @@ dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, visible: false, formdata: null, - tabledata: null, + selines: null, btnconfig: null, loading: false, disabled: false, + hidden: false, loadingNumber: '', autoMatic: false } @@ -56,7 +57,7 @@ disabled = true } }) - this.setState({disabled}) + this.setState({disabled, hidden: disabled && btn.control === 'hidden'}) } } @@ -88,7 +89,7 @@ } }) } - this.setState({disabled}) + this.setState({disabled, hidden: disabled && btn.control === 'hidden'}) } } @@ -168,6 +169,10 @@ return } + this.setState({ + selines: data + }) + if (btn.execMode === 'pop') { let modal = this.state.btnconfig if (!modal && btn.modal) { @@ -176,7 +181,6 @@ this.setState({ loading: true, - tabledata: data, btnconfig: modal }, () => { this.improveAction() @@ -1250,7 +1254,7 @@ } if (btn.execSuccess !== 'never') { - MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execSuccess, btn) + MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execSuccess, btn, '', this.state.selines) } } @@ -1299,7 +1303,7 @@ } if (btn.execError !== 'never') { - MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execError, btn) + MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execError, btn, '', this.state.selines) } } @@ -1416,7 +1420,7 @@ visible: false }) } - this.triggerPrint(this.state.tabledata, res) + this.triggerPrint(this.state.selines, res) }) } @@ -1432,7 +1436,7 @@ modelconfirm = () => { const { BData } = this.props - const { btnconfig, tabledata } = this.state + const { btnconfig, selines } = this.state let _this = this let result = [] @@ -1447,8 +1451,8 @@ if (item.type === 'linkMain' && BData && BData.hasOwnProperty(item.field)) { _initval = BData[item.field] - } else if (_readin && tabledata[0] && tabledata[0].hasOwnProperty(item.field)) { - _initval = tabledata[0][item.field] + } else if (_readin && selines[0] && selines[0].hasOwnProperty(item.field)) { + _initval = selines[0][item.field] } else if (item.type === 'date' && _initval) { _initval = moment().subtract(_initval, 'days').format('YYYY-MM-DD') } else if (item.type === 'datemonth' && _initval) { @@ -1481,7 +1485,7 @@ confirm({ title: this.state.dict['main.action.confirm.tip'], onOk() { - _this.triggerPrint(tabledata, result) + _this.triggerPrint(selines, result) }, onCancel() { _this.setState({ loading: false }) @@ -1533,7 +1537,7 @@ menuType={this.props.menuType} action={btnconfig} inputSubmit={this.handleOk} - data={this.state.tabledata[0]} + data={this.state.selines[0]} BData={this.props.BData} wrappedComponentRef={(inst) => this.formRef = inst} /> @@ -1543,7 +1547,9 @@ render() { const { btn, show } = this.props - const { loadingNumber, loading, disabled } = this.state + const { loadingNumber, loading, disabled, hidden } = this.state + + if (hidden) return null if (show === 'actionList') { return <div style={{display: 'inline-block'}} onClick={(e) => e.stopPropagation()}> diff --git a/src/tabviews/zshare/actionList/tabbutton/index.jsx b/src/tabviews/zshare/actionList/tabbutton/index.jsx index 18ecef1..3d77644 100644 --- a/src/tabviews/zshare/actionList/tabbutton/index.jsx +++ b/src/tabviews/zshare/actionList/tabbutton/index.jsx @@ -22,6 +22,7 @@ state = { dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, disabled: false, + hidden: false, primaryId: '' } @@ -36,7 +37,7 @@ disabled = true } }) - this.setState({disabled}) + this.setState({disabled, hidden: disabled && btn.control === 'hidden'}) } } @@ -62,7 +63,7 @@ } }) } - this.setState({disabled}) + this.setState({disabled, hidden: disabled && btn.control === 'hidden'}) } } @@ -167,7 +168,9 @@ render() { const { btn, show } = this.props - const { disabled } = this.state + const { disabled, hidden } = this.state + + if (hidden) return null if (show === 'actionList') { return ( diff --git a/src/templates/comtableconfig/index.jsx b/src/templates/comtableconfig/index.jsx index 7ae69ce..11d6a3f 100644 --- a/src/templates/comtableconfig/index.jsx +++ b/src/templates/comtableconfig/index.jsx @@ -113,12 +113,6 @@ curuuid: uuid, Template: 'Modal' }) - } else if (item.OpenType === 'tab' && item.tabTemplate === 'FormTab') { // 鍚湁瀛愰厤缃」鐨勬寜閽�(鏍囩椤垫墦寮�) - _oriActions.push({ - prebtn: fromJS(item).toJS(), - curuuid: uuid, - Template: 'FormTab' - }) } item.uuid = uuid @@ -622,7 +616,6 @@ let curBtn = config.action.filter(cell => item.curuuid === cell.uuid)[0] // 鏌ョ湅鍒濆鍖栨寜閽槸鍚﹀瓨鍦� if (!curBtn) return if (curBtn.OpenType !== item.prebtn.OpenType) return - if (curBtn.OpenType === 'tab' && curBtn.tabTemplate !== 'FormTab') return if (curBtn.OpenType === 'funcbutton' && curBtn.execMode !== 'pop') return oriActions.push({ @@ -641,76 +634,30 @@ MenuID: action.prebtn.uuid }).then(result => { if (result.status && result.LongParam) { - let _LongParam = '' let _temp = '' - if (result.LongParam) { - let _subconfig = '' - try { - _subconfig = JSON.parse(window.decodeURIComponent(window.atob(result.LongParam))) - _temp = _subconfig.type - } catch (e) { - console.warn('Parse Failure') - _subconfig = '' - } - - if (_temp === 'FormTab') { - try { - _subconfig.action = _subconfig.action.map(_btn => { - _btn.uuid = Utils.getuuid() - - return _btn - }) - - // 鍏煎宸叉湁缁撴瀯 - if (!_subconfig.tabgroups) { - _subconfig.tabgroups = [{ uuid: 'tabs', sublist: [] }] - } else if (typeof(_subconfig.tabgroups[0]) === 'string') { - let _tabgroups = [] - _subconfig.tabgroups.forEach(groupId => { - let _group = { - uuid: groupId, - sublist: fromJS(_subconfig[groupId]).toJS() - } - delete _subconfig[groupId] - _tabgroups.push(_group) - }) - _subconfig.tabgroups = _tabgroups - } - - _subconfig.tabgroups.forEach(group => { - group.sublist = group.sublist.map(_tab => { - _tab.uuid = Utils.getuuid() - _tab.linkTab = Utils.getuuid() - - return _tab - }) - }) - _subconfig = window.btoa(window.encodeURIComponent(JSON.stringify(_subconfig))) - } catch (e) { - console.warn('Stringify Failure') - _subconfig = '' - } - - _LongParam = _subconfig - } else if (_subconfig) { - _LongParam = result.LongParam - } + let _subconfig = '' + try { + _subconfig = JSON.parse(window.decodeURIComponent(window.atob(result.LongParam))) + _temp = _subconfig.type + } catch (e) { + console.warn('Parse Failure') + _subconfig = '' } - if (_LongParam) { - let param = { - func: 'sPC_ButtonParam_AddUpt', - ParentID: this.props.menu.MenuID, - MenuID: action.curBtn.uuid, - MenuNo: config.MenuNo, - Template: _temp, - MenuName: action.curBtn.label, - PageParam: JSON.stringify({Template: _temp}), - LongParam: _LongParam - } - Api.getSystemConfig(param).then(() => {}) + if (!_subconfig) return + + let param = { + func: 'sPC_ButtonParam_AddUpt', + ParentID: this.props.menu.MenuID, + MenuID: action.curBtn.uuid, + MenuNo: config.MenuNo, + Template: _temp, + MenuName: action.curBtn.label, + PageParam: JSON.stringify({Template: _temp}), + LongParam: result.LongParam } + Api.getSystemConfig(param).then(() => {}) } }) }) diff --git a/src/templates/formtabconfig/actionform/index.jsx b/src/templates/formtabconfig/actionform/index.jsx index 11f8243..42bba10 100644 --- a/src/templates/formtabconfig/actionform/index.jsx +++ b/src/templates/formtabconfig/actionform/index.jsx @@ -79,42 +79,70 @@ let _options = this.getOptions(card.btnType, _intertype) - this.setState({ - formlist: this.props.formlist.map(item => { - if (item.key === 'class') { - item.options = btnClasses - } else if (item.key === 'icon') { - item.options = btnIcons - } else if (item.key === 'resetPageIndex') { - item.tooltip = '椤甸潰鍏抽棴锛屼笖鎵ц鍒锋柊鏃剁敓鏁�' - } else if (item.key === 'sqlType') { - item.options = this.state.insertUpdateOptions - } else if (item.key === 'OpenType') { - item.options = [ - { - value: 'prompt', - text: this.props.dict['model.form.prompt'] - }, { - value: 'exec', - text: this.props.dict['model.form.exec'] - } - ] - if (card.btnType === 'cancel') { - item.readonly = true + let formlist = this.props.formlist.map(item => { + if (item.key === 'class') { + item.options = btnClasses + } else if (item.key === 'icon') { + item.options = btnIcons + } else if (item.key === 'resetPageIndex') { + item.tooltip = '椤甸潰鍏抽棴锛屼笖鎵ц鍒锋柊鏃剁敓鏁�' + } else if (item.key === 'sqlType') { + item.options = this.state.insertUpdateOptions + } else if (item.key === 'OpenType') { + item.options = [ + { + value: 'prompt', + text: this.props.dict['model.form.prompt'] + }, { + value: 'exec', + text: this.props.dict['model.form.exec'] } - } else if (item.key === 'execSuccess' && card.btnType === 'cancel') { - item.label = '鍏抽棴鍚�' - item.options[1].text = '鍒锋柊' - } else if (item.key === 'execSuccess' || item.key === 'execError') { - item.options[1].text = '鍒锋柊' - } else if (item.key === 'innerFunc' && card.btnType !== 'confirm' && _intertype === 'inner') { - item.required = true + ] + if (card.btnType === 'cancel') { + item.readonly = true } + } else if (item.key === 'execSuccess' && card.btnType === 'cancel') { + item.label = '鍏抽棴鍚�' + item.options[1].text = '鍒锋柊' + } else if (item.key === 'execSuccess' || item.key === 'execError') { + item.options[1].text = '鍒锋柊' + } else if (item.key === 'innerFunc' && card.btnType !== 'confirm' && _intertype === 'inner') { + item.required = true + } - item.hidden = !_options.includes(item.key) - return item - }) + item.hidden = !_options.includes(item.key) + return item }) + formlist.push({ + type: 'radio', + key: 'afterExecSuccess', + label: '鎴愬姛鍚�', + initVal: card.afterExecSuccess || 'close', + required: true, + options: [{ + value: 'close', + text: '鍏抽棴' + }, { + value: 'notclose', + text: '涓嶅叧闂�' + }] + }, + { + type: 'radio', + key: 'afterExecError', + label: '澶辫触鍚�', + initVal: card.afterExecError || 'notclose', + required: true, + options: [{ + value: 'close', + text: '鍏抽棴' + }, { + value: 'notclose', + text: '涓嶅叧闂�' + }] + },) + + this.setState({formlist}) } componentDidMount () { diff --git a/src/templates/formtabconfig/index.scss b/src/templates/formtabconfig/index.scss index 88fd0ed..dc1d5ad 100644 --- a/src/templates/formtabconfig/index.scss +++ b/src/templates/formtabconfig/index.scss @@ -65,7 +65,6 @@ } } .ant-list { - margin-top: 20px; .ant-list-item { display: -webkit-box; padding-right: 20px; diff --git a/src/templates/sharecomponent/actioncomponent/actionform/index.jsx b/src/templates/sharecomponent/actioncomponent/actionform/index.jsx index 8f1d740..efdf7db 100644 --- a/src/templates/sharecomponent/actioncomponent/actionform/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/actionform/index.jsx @@ -16,7 +16,7 @@ excelIn: ['label', 'Ot', 'OpenType', 'intertype', 'icon', 'class', 'sheet', 'execSuccess', 'execError'], excelOut: ['label', 'OpenType', 'intertype', 'icon', 'class', 'execSuccess', 'execError', 'pagination', 'search'], popview: ['label', 'Ot', 'OpenType', 'icon', 'class', 'position', 'tabType', 'linkTab', 'popClose', 'display', 'ratio', 'placement'], - tab: ['label', 'Ot', 'OpenType', 'tabTemplate', 'icon', 'class', 'position'], + tab: ['label', 'Ot', 'OpenType', 'icon', 'class', 'position'], innerpage: ['label', 'Ot', 'OpenType', 'pageTemplate', 'icon', 'class', 'position'], funcbutton: ['label', 'OpenType', 'funcType', 'icon', 'class'] } @@ -38,6 +38,7 @@ funcType: null, // 鍔熻兘绫诲瀷 position: null, // 鎸夐挳浣嶇疆 procMode: null, // 澶栭儴鎺ュ彛鍙傛暟澶勭悊鏂瑰紡 + control: '', pageTemplate: null, Ot: null, requireOptions: [{ @@ -97,9 +98,9 @@ let _intertype = card.intertype || 'system' // 鎺ュ彛绫诲瀷 let _procMode = card.procMode || 'system' // 鍙傛暟澶勭悊鏂瑰紡 let _funcType = card.funcType || '' // 鍔熻兘鎸夐挳榛樿绫诲瀷 - let _tabTemplate = card.tabTemplate // 鎸夐挳涓烘爣绛鹃〉鏃讹紝鏍囩绫诲瀷锛氫笁绾ц彍鍗曟垨琛ㄥ崟鏍囩椤� let _pageTemplate = card.pageTemplate // 鏂伴〉闈㈢被鍨� let _Ot = card.Ot || 'requiredSgl' + let control = card.control || '' if (_opentype === 'outerpage') { card.pageTemplate = 'custom' @@ -107,9 +108,10 @@ } let _tabs = this.props.tabs.filter(tab => tab.type === 'SubTable') - let _options = this.getOptions(_opentype, _intertype, _funcType, _pageTemplate, _tabTemplate, _procMode, _Ot) + let _options = this.getOptions(_opentype, _intertype, _funcType, _pageTemplate, _procMode, _Ot, control) this.setState({ + control: control, Ot: _Ot, openType: _opentype, pageTemplate: _pageTemplate, @@ -176,7 +178,7 @@ } } - getOptions = (_opentype, _intertype, _funcType, _pageTemplate, _tabTemplate, _procMode, _Ot) => { + getOptions = (_opentype, _intertype, _funcType, _pageTemplate, _procMode, _Ot, _control) => { let _options = fromJS(actionTypeOptions[_opentype]).toJS() // 閫夐」鍒楄〃 if (_opentype === 'innerpage') { // 鏂伴〉闈紝鍙�夋ā鏉�(鑷畾涔夋椂锛屽彲濉叆澶栭儴閾炬帴) @@ -186,7 +188,7 @@ _options.push('printTemp') } } else if (_opentype === 'tab') { // 鏍囩椤� - if (_tabTemplate === 'ThdMenu') { + if (this.props.card.tabTemplate !== 'FormTab') { _options.push('linkmenu') } } else if (_opentype === 'excelOut') { // 瀵煎叆瀵煎嚭 @@ -203,7 +205,7 @@ } } else if (_opentype === 'funcbutton') { if (_funcType === 'print') { - _options.push('execMode', 'intertype', 'Ot', 'execSuccess', 'execError', 'controlField', 'controlVal') + _options.push('execMode', 'intertype', 'Ot', 'execSuccess', 'execError') if (_intertype === 'outer') { _options.push('innerFunc', 'sysInterface', 'interface', 'proInterface', 'outerFunc', 'callbackFunc') } else if (_intertype === 'inner') { @@ -233,8 +235,11 @@ _options.push('resetPageIndex') } - if (_Ot !== 'notRequired' && _opentype !== 'excelOut' && _opentype !== 'funcbutton') { - _options.push('controlField', 'controlVal') + if (_Ot !== 'notRequired' && _opentype !== 'excelOut') { + _options.push('control') + if (_control) { + _options.push('controlField', 'controlVal') + } } return _options @@ -244,11 +249,11 @@ * @description 鍒囨崲 */ optionChange = (key, value) => { - const { openType, funcType, procMode, Ot } = this.state + const { openType, funcType, procMode, Ot, control } = this.state const { card } = this.props if (key === 'OpenType') { - let _options = this.getOptions(value, 'system', '', this.state.pageTemplate, card.tabTemplate, 'system', Ot) + let _options = this.getOptions(value, 'system', '', this.state.pageTemplate, 'system', Ot, control) let _fieldval = {} let _formlist = this.state.formlist.map(item => { item.hidden = !_options.includes(item.key) @@ -256,6 +261,8 @@ if (item.key === 'intertype') { let iscustom = ['pop', 'prompt', 'exec'].includes(value) item.options = this.state.interTypeOptions.filter(op => (iscustom || op.value !== 'custom')) + } else if (item.key === 'control') { + item.initVal = control } if (item.hidden) return item @@ -333,7 +340,7 @@ this.props.form.setFieldsValue(_fieldval) }) } else if (key === 'funcType') { - let _options = this.getOptions('funcbutton', this.state.interType, value, card.pageTemplate, card.tabTemplate, procMode, Ot) + let _options = this.getOptions('funcbutton', this.state.interType, value, card.pageTemplate, procMode, Ot, control) let _fieldval = {} if (value === 'print') { @@ -393,7 +400,7 @@ this.props.form.setFieldsValue(_fieldval) }) } else if (key === 'pageTemplate') { - let _options = this.getOptions('innerpage', this.state.interType, this.state.funcType, value, card.tabTemplate, procMode, Ot) + let _options = this.getOptions('innerpage', this.state.interType, this.state.funcType, value, procMode, Ot, control) let _fieldval = {} this.setState({ @@ -418,23 +425,8 @@ }, () => { this.props.form.setFieldsValue(_fieldval) }) - } else if (key === 'tabTemplate') { - let _options = ['label', 'Ot', 'OpenType', 'icon', 'class', 'position', 'tabTemplate'] - - if (value === 'ThdMenu') { - _options.push('linkmenu') - } - - this.setState({ - openType: value, - formlist: this.state.formlist.map(item => { - item.hidden = !_options.includes(item.key) - - return item - }) - }) } else if (key === 'intertype') { - let _options = this.getOptions(openType, value, funcType, '', '', procMode, Ot) + let _options = this.getOptions(openType, value, funcType, '', procMode, Ot, control) this.setState({ interType: value, @@ -454,7 +446,7 @@ }) }) } else if (key === 'procMode') { - let _options = this.getOptions(openType, this.state.interType, funcType, '', '', value, Ot) + let _options = this.getOptions(openType, this.state.interType, funcType, '', value, Ot, control) this.setState({ procMode: value, @@ -468,7 +460,7 @@ }) }) } else if (key === 'Ot') { - let _options = this.getOptions(openType, this.state.interType, funcType, this.state.pageTemplate, card.tabTemplate, procMode, value) + let _options = this.getOptions(openType, this.state.interType, funcType, this.state.pageTemplate, procMode, value, control) this.setState({ Ot: value, @@ -477,6 +469,16 @@ return item }) }) + } else if (key === 'control') { + let _options = this.getOptions(openType, this.state.interType, funcType, this.state.pageTemplate, procMode, Ot, value) + + this.setState({ + control: value, + formlist: this.state.formlist.map(item => { + item.hidden = !_options.includes(item.key) + return item + }) + }) } else if (key === 'sysInterface') { if (value === 'true') { this.props.form.setFieldsValue({ diff --git a/src/templates/sharecomponent/fieldscomponent/editcard/index.scss b/src/templates/sharecomponent/fieldscomponent/editcard/index.scss index 8cb4172..c597452 100644 --- a/src/templates/sharecomponent/fieldscomponent/editcard/index.scss +++ b/src/templates/sharecomponent/fieldscomponent/editcard/index.scss @@ -41,8 +41,9 @@ } } .ant-card.fixed { + cursor: not-allowed; .base { - cursor: default; + cursor: not-allowed; } } } diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx index a1c6394..ab0abab 100644 --- a/src/templates/zshare/formconfig.jsx +++ b/src/templates/zshare/formconfig.jsx @@ -854,19 +854,10 @@ } ] - // 鏍囩绫诲瀷锛屼富琛ㄦ墠浼氬瓨鍦ㄨ〃鍗曟爣绛鹃〉 - let tabTems = [{ - value: 'FormTab', - text: '琛ㄥ崟鏍囩椤�' - }] - if (type === 'subtable') { - tabTems = [] - } - if (card.execSuccess === 'view' || card.execSuccess === 'refresh') { // refresh涓鸿〃鍗曟爣绛鹃〉 card.execSuccess = 'grid' } - if (card.execError === 'view' || card.execSuccess === 'refresh') { + if (card.execError === 'view' || card.execError === 'refresh') { card.execError = 'grid' } if (card.popClose === 'view') { @@ -890,6 +881,9 @@ if (card.OpenType === 'blank') { card.OpenType = 'tab' + } + if (!card.control && card.controlField) { + card.control = 'disabled' } return [ @@ -1157,20 +1151,6 @@ options: [] }, { - type: 'select', - key: 'tabTemplate', - label: '鏍囩绫诲瀷', - initVal: card.tabTemplate || '', - required: true, - options: [ - { - value: 'ThdMenu', - text: Formdict['model.menu.level3'] - }, - ...tabTems - ] - }, - { type: 'cascader', key: 'linkmenu', label: Formdict['model.form.linkmenu'], @@ -1187,45 +1167,21 @@ options: menulist }, { - type: 'radio', - key: 'afterExecSuccess', - label: Formdict['header.form.afterExecSuccess'], - initVal: card.afterExecSuccess || 'close', - required: true, - options: [{ - value: 'close', - text: Formdict['model.close'] - }, { - value: 'notclose', - text: Formdict['model.notclose'] - }] - }, - { - type: 'radio', - key: 'afterExecError', - label: Formdict['header.form.afterExecError'], - initVal: card.afterExecError || 'notclose', - required: true, - options: [{ - value: 'close', - text: Formdict['model.close'] - }, { - value: 'notclose', - text: Formdict['model.notclose'] - }] - }, - { type: refresh.length === 0 ? 'radio' : 'select', key: 'execSuccess', label: Formdict['model.form.afterSuccess'], initVal: card.execSuccess || 'never', + tooltip: '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂拌〃鏍笺��', required: true, options: [{ value: 'never', - text: Formdict['header.form.refresh.never'] + text: '涓嶅埛鏂�' }, { value: 'grid', - text: Formdict['header.form.refresh.grid'] + text: '鍒锋柊琛ㄦ牸' + }, { + value: 'line', + text: '鍒锋柊琛�' }, ...refresh] }, @@ -1234,13 +1190,17 @@ key: 'execError', label: Formdict['model.form.afterError'], initVal: card.execError || 'never', + tooltip: '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂拌〃鏍笺��', required: true, options: [{ value: 'never', - text: Formdict['header.form.refresh.never'] + text: '涓嶅埛鏂�' }, { value: 'grid', - text: Formdict['header.form.refresh.grid'] + text: '鍒锋柊琛ㄦ牸' + }, { + value: 'line', + text: '鍒锋柊琛�' }, ...refresh] }, @@ -1252,10 +1212,10 @@ required: true, options: [{ value: 'never', - text: Formdict['header.form.refresh.never'] + text: '涓嶅埛鏂�' }, { value: 'grid', - text: Formdict['header.form.refresh.grid'] + text: '鍒锋柊琛ㄦ牸' }, ...refresh] }, @@ -1356,23 +1316,6 @@ }] }, { - type: 'select', - key: 'controlField', - label: '鎺у埗瀛楁', - tooltip: '绂佺敤鎺у埗瀛楁锛屽彲鏍规嵁鏁版嵁鎺у埗鎸夐挳鏄惁绂佺敤銆�', - initVal: card.controlField || '', - required: false, - options: [{label: '鏃�', field: ''}, ...columns] - }, - { - type: 'text', - key: 'controlVal', - label: '鎺у埗鍊�', - tooltip: '褰撻�夋嫨鎺у埗瀛楁锛屼笖瀛楁鍊间笌鎺у埗鍊肩浉绛夋椂锛屾寜閽細绂佺敤锛屽涓�肩敤閫楀彿鍒嗛殧銆�', - initVal: card.controlVal || '', - required: false - }, - { type: 'radio', key: 'display', label: '鏄剧ず鏂瑰紡', @@ -1429,6 +1372,40 @@ required: false, readonly: false }, + { + type: 'radio', + key: 'control', + label: '鎸夐挳鎺у埗', + initVal: card.control || '', + required: false, + options: [{ + value: '', + text: '鏃�' + }, { + value: 'disabled', + text: '绂佺敤' + }, { + value: 'hidden', + text: '闅愯棌' + }] + }, + { + type: 'select', + key: 'controlField', + label: '鎺у埗瀛楁', + tooltip: '鎺у埗瀛楁锛屽彲鏍规嵁鏁版嵁鎺у埗鎸夐挳鐨勯殣钘忔垨绂佺敤銆�', + initVal: card.controlField || '', + required: true, + options: columns + }, + { + type: 'text', + key: 'controlVal', + label: '鎺у埗鍊�', + tooltip: '褰撻�夋嫨鎺у埗瀛楁锛屼笖瀛楁鍊间笌鎺у埗鍊肩浉绛夋椂锛屾寜閽細闅愯棌鎴栫鐢紝澶氫釜鍊肩敤閫楀彿鍒嗛殧銆�', + initVal: card.controlVal || '', + required: false + }, ] } -- Gitblit v1.8.0