| | |
| | | "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", |
| | |
| | | "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==" |
| | | } |
| | | } |
| | | }, |
| | |
| | | "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==" |
| | | } |
| | | } |
| | | }, |
| | |
| | | }, |
| | | "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==" |
| | | } |
| | | } |
| | | }, |
| | |
| | | "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", |
| | |
| | | }, |
| | | "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", |
| | |
| | | }, |
| | | "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==" |
| | | } |
| | | } |
| | | }, |
| | |
| | | }, |
| | | "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==" |
| | | } |
| | | } |
| | | }, |
| | |
| | | } |
| | | }, |
| | | "@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", |
| | |
| | | }, |
| | | "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==" |
| | | } |
| | | } |
| | | }, |
| | |
| | | "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", |
| | |
| | | "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", |
| | |
| | | } |
| | | }, |
| | | "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", |
| | |
| | | "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", |
| | |
| | | // 获取角色权限 |
| | | 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) |
| | | }) |
| | | |
| | | // 获取主菜单参数 |
| | |
| | | <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={'图标选择'} |
| | |
| | | } |
| | | .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; |
| | | } |
| | |
| | | 'model.status.forbidden': '禁用', |
| | | 'model.status.open': '启用', |
| | | 'header.form.readin': '自动填充', |
| | | 'header.form.afterExecSuccess': '成功后', |
| | | 'header.form.afterExecError': '失败后', |
| | | 'header.form.pagination': '分页', |
| | | 'header.form.regular': '正则校验', |
| | | 'header.form.quickadd': '快捷添加', |
| | |
| | | 'model.status.forbidden': '禁用', |
| | | 'model.status.open': '启用', |
| | | 'header.form.readin': '自动填充', |
| | | 'header.form.afterExecSuccess': '成功后', |
| | | 'header.form.afterExecError': '失败后', |
| | | 'header.form.pagination': '分页', |
| | | 'header.form.regular': '正则校验', |
| | | 'header.form.quickadd': '快捷添加', |
| | |
| | | } |
| | | } 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') { |
| | |
| | | } |
| | | } |
| | | |
| | | if (_Ot !== 'notRequired' && _opentype !== 'excelOut' && _opentype !== 'funcbutton') { |
| | | if (_Ot !== 'notRequired' && _opentype !== 'excelOut') { |
| | | _options.push('controlField', 'controlVal') |
| | | } |
| | | if (_Ot === 'requiredSgl' && ['pop', 'prompt', 'exec'].includes(_opentype)) { |
| | |
| | | }) |
| | | } |
| | | |
| | | if (!card.control && card.controlField) { |
| | | card.control = 'disabled' |
| | | } |
| | | |
| | | let forms = [ |
| | | { |
| | | type: 'select', |
| | |
| | | value: 'grid', |
| | | text: '刷新当前组件' |
| | | }, { |
| | | value: 'line', |
| | | text: '刷新行' |
| | | }, { |
| | | value: 'mainline', |
| | | text: '刷新上级组件 - 行' |
| | | }, { |
| | |
| | | }, { |
| | | value: 'grid', |
| | | text: '刷新当前组件' |
| | | }, { |
| | | value: 'line', |
| | | text: '刷新行' |
| | | }, { |
| | | value: 'mainline', |
| | | text: '刷新上级组件 - 行' |
| | |
| | | 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'], |
| | |
| | | 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 |
| | |
| | | * @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 () { |
| | |
| | | </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) { |
| | |
| | | * @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 |
| | | }, () => { |
| | |
| | | * @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) // 同级标签刷新 |
| | |
| | | |
| | | state = { |
| | | formdata: null, |
| | | tabledata: null, |
| | | loadingUuid: '' |
| | | } |
| | | |
| | |
| | | * @param {*} position // 刷新位置 |
| | | * @param {*} btn // 执行的按钮 |
| | | */ |
| | | refreshByButtonResult = (menuId, position, btn) => { |
| | | refreshByButtonResult = (menuId, position, btn, id, lines) => { |
| | | const { MenuID } = this.props |
| | | |
| | | if (MenuID !== menuId) return |
| | |
| | | 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) |
| | |
| | | BID: PropTypes.string, // 上级数据ID |
| | | BData: PropTypes.any, // 上级数据 |
| | | MenuID: PropTypes.string, // 菜单Id |
| | | mainSearch: PropTypes.any, // 主表搜索条件 |
| | | SupMenuID: PropTypes.string, // 上级菜单Id |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | 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 === '') |
| | |
| | | * @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 |
| | |
| | | } |
| | | |
| | | /** |
| | | * @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 搜索条件改变时,重置表格数据 |
| | | * 含有初始不加载的页面,修改设置 |
| | | */ |
| | |
| | | * @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 |
| | | }) |
| | | } |
| | |
| | | * @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) |
| | | } |
| | | |
| | |
| | | state = { |
| | | dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, |
| | | disabled: false, |
| | | hidden: false, |
| | | loading: false |
| | | } |
| | | |
| | |
| | | disabled = true |
| | | } |
| | | }) |
| | | this.setState({disabled}) |
| | | this.setState({disabled, hidden: disabled && btn.control === 'hidden'}) |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | }) |
| | | } |
| | | this.setState({disabled}) |
| | | this.setState({disabled, hidden: disabled && btn.control === 'hidden'}) |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | 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 ( |
| | |
| | | state = { |
| | | dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, |
| | | loading: false, |
| | | selines: null, |
| | | disabled: false, |
| | | hidden: false, |
| | | primaryId: '', |
| | | } |
| | | |
| | |
| | | disabled = true |
| | | } |
| | | }) |
| | | this.setState({disabled}) |
| | | this.setState({disabled, hidden: disabled && btn.control === 'hidden'}) |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | }) |
| | | } |
| | | this.setState({disabled}) |
| | | this.setState({disabled, hidden: disabled && btn.control === 'hidden'}) |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | this.setState({ |
| | | selines: data, |
| | | primaryId: primaryId |
| | | }, () => { |
| | | this.refs.excelIn.exceltrigger() |
| | |
| | | }) |
| | | |
| | | 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] |
| | |
| | | }) |
| | | |
| | | if (btn.execError !== 'never') { |
| | | MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execError, btn) |
| | | MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execError, btn, '', this.state.selines) |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | 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()}> |
| | |
| | | }) |
| | | |
| | | 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] |
| | |
| | | }) |
| | | |
| | | if (btn.execError !== 'never') { |
| | | MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execError, btn) |
| | | MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execError, btn, '', []) |
| | | } |
| | | } |
| | | |
| | |
| | | state = { |
| | | dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, |
| | | disabled: false, |
| | | hidden: false, |
| | | visible: false |
| | | } |
| | | |
| | |
| | | disabled = true |
| | | } |
| | | }) |
| | | this.setState({disabled}) |
| | | this.setState({disabled, hidden: disabled && btn.control === 'hidden'}) |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | }) |
| | | } |
| | | this.setState({disabled}) |
| | | this.setState({disabled, hidden: disabled && btn.control === 'hidden'}) |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | render() { |
| | | const { btn, show } = this.props |
| | | const { disabled } = this.state |
| | | const { disabled, hidden } = this.state |
| | | |
| | | if (hidden) return null |
| | | |
| | | if (show === 'actionList') { |
| | | return ( |
| | |
| | | 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 |
| | | } |
| | |
| | | disabled = true |
| | | } |
| | | }) |
| | | this.setState({disabled}) |
| | | this.setState({disabled, hidden: disabled && btn.control === 'hidden'}) |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | }) |
| | | } |
| | | this.setState({disabled}) |
| | | this.setState({disabled, hidden: disabled && btn.control === 'hidden'}) |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | this.setState({ loading: true }) |
| | | |
| | | this.execSubmit(this.state.tabledata, () => {}, res.form) |
| | | this.execSubmit(this.state.selines, () => {}, res.form) |
| | | } |
| | | |
| | | resetModuleParam = (menuId, btnId, param) => { |
| | |
| | | return |
| | | } |
| | | |
| | | this.setState({ |
| | | selines: data |
| | | }) |
| | | |
| | | if (btn.OpenType === 'formSubmit') { |
| | | this.setState({ |
| | | tabledata: data |
| | | }) |
| | | MKEmitter.emit('mkFormSubmit', btn.uuid) |
| | | return |
| | | } else if (btn.OpenType === 'prompt') { |
| | |
| | | |
| | | this.setState({ |
| | | loading: true, |
| | | tabledata: data, |
| | | btnconfig: modal |
| | | }, () => { |
| | | this.improveAction() |
| | |
| | | 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) { |
| | |
| | | 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) |
| | | } |
| | | } |
| | | }) |
| | |
| | | } |
| | | |
| | | if (btn.execError !== 'never') { |
| | | MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execError, btn) |
| | | MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execError, btn, '', this.state.selines) |
| | | } |
| | | } |
| | | |
| | |
| | | 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) |
| | | }) |
| | | } |
| | | |
| | |
| | | |
| | | modelconfirm = () => { |
| | | const { BData } = this.props |
| | | const { btnconfig, tabledata } = this.state |
| | | const { btnconfig, selines } = this.state |
| | | let _this = this |
| | | |
| | | let result = [] |
| | |
| | | |
| | | 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) { |
| | |
| | | title: this.state.dict['main.action.confirm.tip'], |
| | | onOk() { |
| | | return new Promise(resolve => { |
| | | _this.execSubmit(tabledata, resolve, result) |
| | | _this.execSubmit(selines, resolve, result) |
| | | }) |
| | | }, |
| | | onCancel() { |
| | |
| | | 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} |
| | | /> |
| | |
| | | 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} |
| | | /> |
| | |
| | | |
| | | 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()}> |
| | |
| | | popData: null, |
| | | primaryId: '', |
| | | disabled: false, |
| | | hidden: false, |
| | | loading: false, |
| | | } |
| | | |
| | |
| | | disabled = true |
| | | } |
| | | }) |
| | | this.setState({disabled}) |
| | | this.setState({disabled, hidden: disabled && btn.control === 'hidden'}) |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | }) |
| | | } |
| | | this.setState({disabled}) |
| | | this.setState({disabled, hidden: disabled && btn.control === 'hidden'}) |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | 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 = '' |
| | |
| | | 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 |
| | | } |
| | |
| | | disabled = true |
| | | } |
| | | }) |
| | | this.setState({disabled}) |
| | | this.setState({disabled, hidden: disabled && btn.control === 'hidden'}) |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | }) |
| | | } |
| | | this.setState({disabled}) |
| | | this.setState({disabled, hidden: disabled && btn.control === 'hidden'}) |
| | | } |
| | | } |
| | | |
| | |
| | | return |
| | | } |
| | | |
| | | this.setState({ |
| | | selines: data |
| | | }) |
| | | |
| | | if (btn.execMode === 'pop') { |
| | | let modal = this.state.btnconfig |
| | | if (!modal && btn.modal) { |
| | |
| | | |
| | | this.setState({ |
| | | loading: true, |
| | | tabledata: data, |
| | | btnconfig: modal |
| | | }, () => { |
| | | this.improveAction() |
| | |
| | | } |
| | | |
| | | 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.execError !== 'never') { |
| | | MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execError, btn) |
| | | MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execError, btn, '', this.state.selines) |
| | | } |
| | | } |
| | | |
| | |
| | | visible: false |
| | | }) |
| | | } |
| | | this.triggerPrint(this.state.tabledata, res) |
| | | this.triggerPrint(this.state.selines, res) |
| | | }) |
| | | } |
| | | |
| | |
| | | |
| | | modelconfirm = () => { |
| | | const { BData } = this.props |
| | | const { btnconfig, tabledata } = this.state |
| | | const { btnconfig, selines } = this.state |
| | | let _this = this |
| | | let result = [] |
| | | |
| | |
| | | |
| | | 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) { |
| | |
| | | confirm({ |
| | | title: this.state.dict['main.action.confirm.tip'], |
| | | onOk() { |
| | | _this.triggerPrint(tabledata, result) |
| | | _this.triggerPrint(selines, result) |
| | | }, |
| | | onCancel() { |
| | | _this.setState({ loading: false }) |
| | |
| | | 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} |
| | | /> |
| | |
| | | |
| | | 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()}> |
| | |
| | | state = { |
| | | dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, |
| | | disabled: false, |
| | | hidden: false, |
| | | primaryId: '' |
| | | } |
| | | |
| | |
| | | disabled = true |
| | | } |
| | | }) |
| | | this.setState({disabled}) |
| | | this.setState({disabled, hidden: disabled && btn.control === 'hidden'}) |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | }) |
| | | } |
| | | this.setState({disabled}) |
| | | this.setState({disabled, hidden: disabled && btn.control === 'hidden'}) |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | render() { |
| | | const { btn, show } = this.props |
| | | const { disabled } = this.state |
| | | const { disabled, hidden } = this.state |
| | | |
| | | if (hidden) return null |
| | | |
| | | if (show === 'actionList') { |
| | | return ( |
| | |
| | | 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 |
| | |
| | | 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({ |
| | |
| | | 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(() => {}) |
| | | } |
| | | }) |
| | | }) |
| | |
| | | |
| | | 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 () { |
| | |
| | | } |
| | | } |
| | | .ant-list { |
| | | margin-top: 20px; |
| | | .ant-list-item { |
| | | display: -webkit-box; |
| | | padding-right: 20px; |
| | |
| | | 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'] |
| | | } |
| | |
| | | funcType: null, // 功能类型 |
| | | position: null, // 按钮位置 |
| | | procMode: null, // 外部接口参数处理方式 |
| | | control: '', |
| | | pageTemplate: null, |
| | | Ot: null, |
| | | requireOptions: [{ |
| | |
| | | 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' |
| | |
| | | } |
| | | |
| | | 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, |
| | |
| | | } |
| | | } |
| | | |
| | | 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') { // 新页面,可选模板(自定义时,可填入外部链接) |
| | |
| | | _options.push('printTemp') |
| | | } |
| | | } else if (_opentype === 'tab') { // 标签页 |
| | | if (_tabTemplate === 'ThdMenu') { |
| | | if (this.props.card.tabTemplate !== 'FormTab') { |
| | | _options.push('linkmenu') |
| | | } |
| | | } else if (_opentype === 'excelOut') { // 导入导出 |
| | |
| | | } |
| | | } 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') { |
| | |
| | | _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 |
| | |
| | | * @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) |
| | |
| | | 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 |
| | |
| | | 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') { |
| | |
| | | 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({ |
| | |
| | | }, () => { |
| | | 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, |
| | |
| | | }) |
| | | }) |
| | | } 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, |
| | |
| | | }) |
| | | }) |
| | | } 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, |
| | |
| | | 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({ |
| | |
| | | } |
| | | } |
| | | .ant-card.fixed { |
| | | cursor: not-allowed; |
| | | .base { |
| | | cursor: default; |
| | | cursor: not-allowed; |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | ] |
| | | |
| | | // 标签类型,主表才会存在表单标签页 |
| | | 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') { |
| | |
| | | |
| | | if (card.OpenType === 'blank') { |
| | | card.OpenType = 'tab' |
| | | } |
| | | if (!card.control && card.controlField) { |
| | | card.control = 'disabled' |
| | | } |
| | | |
| | | return [ |
| | |
| | | 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'], |
| | |
| | | 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] |
| | | }, |
| | |
| | | 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] |
| | | }, |
| | |
| | | required: true, |
| | | options: [{ |
| | | value: 'never', |
| | | text: Formdict['header.form.refresh.never'] |
| | | text: '不刷新' |
| | | }, { |
| | | value: 'grid', |
| | | text: Formdict['header.form.refresh.grid'] |
| | | text: '刷新表格' |
| | | }, |
| | | ...refresh] |
| | | }, |
| | |
| | | }] |
| | | }, |
| | | { |
| | | 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: '显示方式', |
| | |
| | | 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 |
| | | }, |
| | | ] |
| | | } |
| | | |