| | |
| | | "resolved": "https://registry.npmjs.org/@csstools/normalize.css/-/normalize.css-9.0.1.tgz", |
| | | "integrity": "sha512-6It2EVfGskxZCQhuykrfnALg7oVeiI6KclWSmGDqB0AiInVrTGB9Jp9i4/Ad21u9Jde/voVQz6eFX/eSg/UsPA==" |
| | | }, |
| | | "@fast-csv/format": { |
| | | "version": "4.3.5", |
| | | "resolved": "https://registry.npmjs.org/@fast-csv/format/-/format-4.3.5.tgz", |
| | | "integrity": "sha512-8iRn6QF3I8Ak78lNAa+Gdl5MJJBM5vRHivFtMRUWINdevNo00K7OXxS2PshawLKTejVwieIlPmK5YlLu6w4u8A==", |
| | | "requires": { |
| | | "@types/node": "^14.0.1", |
| | | "lodash.escaperegexp": "^4.1.2", |
| | | "lodash.isboolean": "^3.0.3", |
| | | "lodash.isequal": "^4.5.0", |
| | | "lodash.isfunction": "^3.0.9", |
| | | "lodash.isnil": "^4.0.0" |
| | | } |
| | | }, |
| | | "@fast-csv/parse": { |
| | | "version": "4.3.6", |
| | | "resolved": "https://registry.npmjs.org/@fast-csv/parse/-/parse-4.3.6.tgz", |
| | | "integrity": "sha512-uRsLYksqpbDmWaSmzvJcuApSEe38+6NQZBUsuAyMZKqHxH0g1wcJgsKUvN3WC8tewaqFjBMMGrkHmC+T7k8LvA==", |
| | | "requires": { |
| | | "@types/node": "^14.0.1", |
| | | "lodash.escaperegexp": "^4.1.2", |
| | | "lodash.groupby": "^4.6.0", |
| | | "lodash.isfunction": "^3.0.9", |
| | | "lodash.isnil": "^4.0.0", |
| | | "lodash.isundefined": "^3.0.1", |
| | | "lodash.uniq": "^4.5.0" |
| | | } |
| | | }, |
| | | "@hapi/address": { |
| | | "version": "2.1.1", |
| | | "resolved": "https://registry.npmjs.org/@hapi/address/-/address-2.1.1.tgz", |
| | |
| | | "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.3.tgz", |
| | | "integrity": "sha512-Il2DtDVRGDcqjDtE+rF8iqg1CArehSK84HZJCT7AMITlyXRBpuPhqGLDQMowraqqu1coEaimg4ZOqggt6L6L+A==" |
| | | }, |
| | | "@types/node": { |
| | | "version": "14.14.44", |
| | | "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.44.tgz", |
| | | "integrity": "sha512-+gaugz6Oce6ZInfI/tK4Pq5wIIkJMEJUu92RB3Eu93mtj4wjjjz9EB5mLp5s1pSsLXdC/CPut/xF20ZzAQJbTA==" |
| | | }, |
| | | "@types/prop-types": { |
| | | "version": "15.7.2", |
| | | "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.2.tgz", |
| | |
| | | "version": "1.2.0", |
| | | "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", |
| | | "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" |
| | | }, |
| | | "archiver": { |
| | | "version": "5.3.0", |
| | | "resolved": "https://registry.npmjs.org/archiver/-/archiver-5.3.0.tgz", |
| | | "integrity": "sha512-iUw+oDwK0fgNpvveEsdQ0Ase6IIKztBJU2U0E9MzszMfmVVUyv1QJhS2ITW9ZCqx8dktAxVAjWWkKehuZE8OPg==", |
| | | "requires": { |
| | | "archiver-utils": "^2.1.0", |
| | | "async": "^3.2.0", |
| | | "buffer-crc32": "^0.2.1", |
| | | "readable-stream": "^3.6.0", |
| | | "readdir-glob": "^1.0.0", |
| | | "tar-stream": "^2.2.0", |
| | | "zip-stream": "^4.1.0" |
| | | }, |
| | | "dependencies": { |
| | | "async": { |
| | | "version": "3.2.0", |
| | | "resolved": "https://registry.npmjs.org/async/-/async-3.2.0.tgz", |
| | | "integrity": "sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw==" |
| | | }, |
| | | "readable-stream": { |
| | | "version": "3.6.0", |
| | | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", |
| | | "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", |
| | | "requires": { |
| | | "inherits": "^2.0.3", |
| | | "string_decoder": "^1.1.1", |
| | | "util-deprecate": "^1.0.1" |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "archiver-utils": { |
| | | "version": "2.1.0", |
| | | "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-2.1.0.tgz", |
| | | "integrity": "sha512-bEL/yUb/fNNiNTuUz979Z0Yg5L+LzLxGJz8x79lYmR54fmTIb6ob/hNQgkQnIUDWIFjZVQwl9Xs356I6BAMHfw==", |
| | | "requires": { |
| | | "glob": "^7.1.4", |
| | | "graceful-fs": "^4.2.0", |
| | | "lazystream": "^1.0.0", |
| | | "lodash.defaults": "^4.2.0", |
| | | "lodash.difference": "^4.5.0", |
| | | "lodash.flatten": "^4.4.0", |
| | | "lodash.isplainobject": "^4.0.6", |
| | | "lodash.union": "^4.6.0", |
| | | "normalize-path": "^3.0.0", |
| | | "readable-stream": "^2.0.0" |
| | | }, |
| | | "dependencies": { |
| | | "normalize-path": { |
| | | "version": "3.0.0", |
| | | "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", |
| | | "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" |
| | | } |
| | | } |
| | | }, |
| | | "are-we-there-yet": { |
| | | "version": "1.1.5", |
| | |
| | | "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", |
| | | "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==" |
| | | }, |
| | | "binary": { |
| | | "version": "0.3.0", |
| | | "resolved": "https://registry.npmjs.org/binary/-/binary-0.3.0.tgz", |
| | | "integrity": "sha1-n2BVO8XOjDOG87VTz/R0Yq3sqnk=", |
| | | "requires": { |
| | | "buffers": "~0.1.1", |
| | | "chainsaw": "~0.1.0" |
| | | } |
| | | }, |
| | | "binary-extensions": { |
| | | "version": "1.13.1", |
| | | "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", |
| | | "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==" |
| | | }, |
| | | "bl": { |
| | | "version": "4.1.0", |
| | | "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", |
| | | "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", |
| | | "requires": { |
| | | "buffer": "^5.5.0", |
| | | "inherits": "^2.0.4", |
| | | "readable-stream": "^3.4.0" |
| | | }, |
| | | "dependencies": { |
| | | "buffer": { |
| | | "version": "5.7.1", |
| | | "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", |
| | | "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", |
| | | "requires": { |
| | | "base64-js": "^1.3.1", |
| | | "ieee754": "^1.1.13" |
| | | } |
| | | }, |
| | | "readable-stream": { |
| | | "version": "3.6.0", |
| | | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", |
| | | "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", |
| | | "requires": { |
| | | "inherits": "^2.0.3", |
| | | "string_decoder": "^1.1.1", |
| | | "util-deprecate": "^1.0.1" |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "block-stream": { |
| | | "version": "0.0.9", |
| | |
| | | "resolved": "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.1.tgz", |
| | | "integrity": "sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==" |
| | | }, |
| | | "buffer-indexof-polyfill": { |
| | | "version": "1.0.2", |
| | | "resolved": "https://registry.npmjs.org/buffer-indexof-polyfill/-/buffer-indexof-polyfill-1.0.2.tgz", |
| | | "integrity": "sha512-I7wzHwA3t1/lwXQh+A5PbNvJxgfo5r3xulgpYDB5zckTu/Z9oUK9biouBKQUjEqzaz3HnAT6TYoovmE+GqSf7A==" |
| | | }, |
| | | "buffer-xor": { |
| | | "version": "1.0.3", |
| | | "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", |
| | | "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" |
| | | }, |
| | | "buffers": { |
| | | "version": "0.1.1", |
| | | "resolved": "https://registry.npmjs.org/buffers/-/buffers-0.1.1.tgz", |
| | | "integrity": "sha1-skV5w77U1tOWru5tmorn9Ugqt7s=" |
| | | }, |
| | | "builtin-status-codes": { |
| | | "version": "3.0.0", |
| | |
| | | "commander": "^2.16.0", |
| | | "crc-32": "~1.2.0", |
| | | "printj": "~1.1.2" |
| | | } |
| | | }, |
| | | "chainsaw": { |
| | | "version": "0.1.0", |
| | | "resolved": "https://registry.npmjs.org/chainsaw/-/chainsaw-0.1.0.tgz", |
| | | "integrity": "sha1-XqtQsor+WAdNDVgpE4iCi15fvJg=", |
| | | "requires": { |
| | | "traverse": ">=0.3.0 <0.4" |
| | | }, |
| | | "dependencies": { |
| | | "traverse": { |
| | | "version": "0.3.9", |
| | | "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.3.9.tgz", |
| | | "integrity": "sha1-cXuPIgzAu3tE5AUUwisui7xw2Lk=" |
| | | } |
| | | } |
| | | }, |
| | | "chalk": { |
| | |
| | | "arity-n": "^1.0.4" |
| | | } |
| | | }, |
| | | "compress-commons": { |
| | | "version": "4.1.0", |
| | | "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-4.1.0.tgz", |
| | | "integrity": "sha512-ofaaLqfraD1YRTkrRKPCrGJ1pFeDG/MVCkVVV2FNGeWquSlqw5wOrwOfPQ1xF2u+blpeWASie5EubHz+vsNIgA==", |
| | | "requires": { |
| | | "buffer-crc32": "^0.2.13", |
| | | "crc32-stream": "^4.0.1", |
| | | "normalize-path": "^3.0.0", |
| | | "readable-stream": "^3.6.0" |
| | | }, |
| | | "dependencies": { |
| | | "normalize-path": { |
| | | "version": "3.0.0", |
| | | "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", |
| | | "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" |
| | | }, |
| | | "readable-stream": { |
| | | "version": "3.6.0", |
| | | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", |
| | | "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", |
| | | "requires": { |
| | | "inherits": "^2.0.3", |
| | | "string_decoder": "^1.1.1", |
| | | "util-deprecate": "^1.0.1" |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "compressible": { |
| | | "version": "2.0.17", |
| | | "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.17.tgz", |
| | |
| | | "requires": { |
| | | "exit-on-epipe": "~1.0.1", |
| | | "printj": "~1.1.0" |
| | | } |
| | | }, |
| | | "crc32-stream": { |
| | | "version": "4.0.2", |
| | | "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-4.0.2.tgz", |
| | | "integrity": "sha512-DxFZ/Hk473b/muq1VJ///PMNLj0ZMnzye9thBpmjpJKCc5eMgB95aK8zCGrGfQ90cWo561Te6HK9D+j4KPdM6w==", |
| | | "requires": { |
| | | "crc-32": "^1.2.0", |
| | | "readable-stream": "^3.4.0" |
| | | }, |
| | | "dependencies": { |
| | | "readable-stream": { |
| | | "version": "3.6.0", |
| | | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", |
| | | "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", |
| | | "requires": { |
| | | "inherits": "^2.0.3", |
| | | "string_decoder": "^1.1.1", |
| | | "util-deprecate": "^1.0.1" |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "create-ecdh": { |
| | |
| | | "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", |
| | | "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=" |
| | | }, |
| | | "duplexer2": { |
| | | "version": "0.1.4", |
| | | "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", |
| | | "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", |
| | | "requires": { |
| | | "readable-stream": "^2.0.2" |
| | | } |
| | | }, |
| | | "duplexify": { |
| | | "version": "3.7.1", |
| | | "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", |
| | |
| | | "safe-buffer": "^5.1.1" |
| | | } |
| | | }, |
| | | "exceljs": { |
| | | "version": "4.2.1", |
| | | "resolved": "https://registry.npmjs.org/exceljs/-/exceljs-4.2.1.tgz", |
| | | "integrity": "sha512-EogoTdXH1X1PxqD9sV8caYd1RIfXN3PVlCV+mA/87CgdO2h4X5xAEbr7CaiP8tffz7L4aBFwsdMbjfMXi29NjA==", |
| | | "requires": { |
| | | "archiver": "^5.0.0", |
| | | "dayjs": "^1.8.34", |
| | | "fast-csv": "^4.3.1", |
| | | "jszip": "^3.5.0", |
| | | "readable-stream": "^3.6.0", |
| | | "saxes": "^5.0.1", |
| | | "tmp": "^0.2.0", |
| | | "unzipper": "^0.10.11", |
| | | "uuid": "^8.3.0" |
| | | }, |
| | | "dependencies": { |
| | | "readable-stream": { |
| | | "version": "3.6.0", |
| | | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", |
| | | "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", |
| | | "requires": { |
| | | "inherits": "^2.0.3", |
| | | "string_decoder": "^1.1.1", |
| | | "util-deprecate": "^1.0.1" |
| | | } |
| | | }, |
| | | "rimraf": { |
| | | "version": "3.0.2", |
| | | "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", |
| | | "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", |
| | | "requires": { |
| | | "glob": "^7.1.3" |
| | | } |
| | | }, |
| | | "saxes": { |
| | | "version": "5.0.1", |
| | | "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", |
| | | "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", |
| | | "requires": { |
| | | "xmlchars": "^2.2.0" |
| | | } |
| | | }, |
| | | "tmp": { |
| | | "version": "0.2.1", |
| | | "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", |
| | | "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", |
| | | "requires": { |
| | | "rimraf": "^3.0.0" |
| | | } |
| | | }, |
| | | "uuid": { |
| | | "version": "8.3.2", |
| | | "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", |
| | | "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" |
| | | } |
| | | } |
| | | }, |
| | | "exec-sh": { |
| | | "version": "0.3.2", |
| | | "resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.3.2.tgz", |
| | |
| | | "color-support": "^1.1.3", |
| | | "parse-node-version": "^1.0.0", |
| | | "time-stamp": "^1.0.0" |
| | | } |
| | | }, |
| | | "fast-csv": { |
| | | "version": "4.3.6", |
| | | "resolved": "https://registry.npmjs.org/fast-csv/-/fast-csv-4.3.6.tgz", |
| | | "integrity": "sha512-2RNSpuwwsJGP0frGsOmTb9oUF+VkFSM4SyLTDgwf2ciHWTarN0lQTC+F2f/t5J9QjW+c65VFIAAu85GsvMIusw==", |
| | | "requires": { |
| | | "@fast-csv/format": "4.3.5", |
| | | "@fast-csv/parse": "4.3.6" |
| | | } |
| | | }, |
| | | "fast-deep-equal": { |
| | |
| | | "inherits": "^2.0.1", |
| | | "readable-stream": "^2.0.0" |
| | | } |
| | | }, |
| | | "fs-constants": { |
| | | "version": "1.0.0", |
| | | "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", |
| | | "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" |
| | | }, |
| | | "fs-extra": { |
| | | "version": "7.0.1", |
| | |
| | | "version": "0.6.3", |
| | | "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.6.3.tgz", |
| | | "integrity": "sha512-47xSUiQioGaB96nqtp5/q55m0aBQSQdyIloMOc/x+QVTDZLNmXE892IIDrJ0hM1A5vcNUDD5tDffkSP5lCaIIA==" |
| | | }, |
| | | "immediate": { |
| | | "version": "3.0.6", |
| | | "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", |
| | | "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=" |
| | | }, |
| | | "immer": { |
| | | "version": "1.10.0", |
| | |
| | | "resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz", |
| | | "integrity": "sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g==" |
| | | }, |
| | | "js-table2excel": { |
| | | "version": "1.0.3", |
| | | "resolved": "https://registry.npmjs.org/js-table2excel/-/js-table2excel-1.0.3.tgz", |
| | | "integrity": "sha512-ivzOdgYqOD3zqzJZfW0Nm35P9BWffxD0Unwr+2QBeEawV7hhRY9RHBVNcvO6A9PhGkMyqPVL/u4/NeufaTTTXw==" |
| | | }, |
| | | "js-tokens": { |
| | | "version": "4.0.0", |
| | | "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", |
| | |
| | | "object.assign": "^4.1.0" |
| | | } |
| | | }, |
| | | "jszip": { |
| | | "version": "3.6.0", |
| | | "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.6.0.tgz", |
| | | "integrity": "sha512-jgnQoG9LKnWO3mnVNBnfhkh0QknICd1FGSrXcgrl67zioyJ4wgx25o9ZqwNtrROSflGBCGYnJfjrIyRIby1OoQ==", |
| | | "requires": { |
| | | "lie": "~3.3.0", |
| | | "pako": "~1.0.2", |
| | | "readable-stream": "~2.3.6", |
| | | "set-immediate-shim": "~1.0.1" |
| | | } |
| | | }, |
| | | "killable": { |
| | | "version": "1.0.1", |
| | | "resolved": "https://registry.npmjs.org/killable/-/killable-1.0.1.tgz", |
| | |
| | | "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", |
| | | "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=" |
| | | }, |
| | | "lazystream": { |
| | | "version": "1.0.0", |
| | | "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", |
| | | "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", |
| | | "requires": { |
| | | "readable-stream": "^2.0.5" |
| | | } |
| | | }, |
| | | "lcid": { |
| | | "version": "1.0.0", |
| | | "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", |
| | |
| | | "prelude-ls": "~1.1.2", |
| | | "type-check": "~0.3.2" |
| | | } |
| | | }, |
| | | "lie": { |
| | | "version": "3.3.0", |
| | | "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", |
| | | "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", |
| | | "requires": { |
| | | "immediate": "~3.0.5" |
| | | } |
| | | }, |
| | | "listenercount": { |
| | | "version": "1.0.1", |
| | | "resolved": "https://registry.npmjs.org/listenercount/-/listenercount-1.0.1.tgz", |
| | | "integrity": "sha1-hMinKrWcRyUyFIDJdeZQg0LnCTc=" |
| | | }, |
| | | "load-json-file": { |
| | | "version": "1.1.0", |
| | |
| | | "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", |
| | | "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=" |
| | | }, |
| | | "lodash.defaults": { |
| | | "version": "4.2.0", |
| | | "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", |
| | | "integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=" |
| | | }, |
| | | "lodash.difference": { |
| | | "version": "4.5.0", |
| | | "resolved": "https://registry.npmjs.org/lodash.difference/-/lodash.difference-4.5.0.tgz", |
| | | "integrity": "sha1-nMtOUF1Ia5FlE0V3KIWi3yf9AXw=" |
| | | }, |
| | | "lodash.escaperegexp": { |
| | | "version": "4.1.2", |
| | | "resolved": "https://registry.npmjs.org/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz", |
| | | "integrity": "sha1-ZHYsSGGAglGKw99Mz11YhtriA0c=" |
| | | }, |
| | | "lodash.flatten": { |
| | | "version": "4.4.0", |
| | | "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", |
| | | "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=" |
| | | }, |
| | | "lodash.groupby": { |
| | | "version": "4.6.0", |
| | | "resolved": "https://registry.npmjs.org/lodash.groupby/-/lodash.groupby-4.6.0.tgz", |
| | | "integrity": "sha1-Cwih3PaDl8OXhVwyOXg4Mt90A9E=" |
| | | }, |
| | | "lodash.isarguments": { |
| | | "version": "3.1.0", |
| | | "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", |
| | |
| | | "version": "3.0.4", |
| | | "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", |
| | | "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=" |
| | | }, |
| | | "lodash.isboolean": { |
| | | "version": "3.0.3", |
| | | "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", |
| | | "integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY=" |
| | | }, |
| | | "lodash.isequal": { |
| | | "version": "4.5.0", |
| | | "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", |
| | | "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=" |
| | | }, |
| | | "lodash.isfunction": { |
| | | "version": "3.0.9", |
| | | "resolved": "https://registry.npmjs.org/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz", |
| | | "integrity": "sha512-AirXNj15uRIMMPihnkInB4i3NHeb4iBtNg9WRWuK2o31S+ePwwNmDPaTL3o7dTJ+VXNZim7rFs4rxN4YU1oUJw==" |
| | | }, |
| | | "lodash.isnil": { |
| | | "version": "4.0.0", |
| | | "resolved": "https://registry.npmjs.org/lodash.isnil/-/lodash.isnil-4.0.0.tgz", |
| | | "integrity": "sha1-SeKM1VkBNFjIFMVHnTxmOiG/qmw=" |
| | | }, |
| | | "lodash.isplainobject": { |
| | | "version": "4.0.6", |
| | | "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", |
| | | "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=" |
| | | }, |
| | | "lodash.isundefined": { |
| | | "version": "3.0.1", |
| | | "resolved": "https://registry.npmjs.org/lodash.isundefined/-/lodash.isundefined-3.0.1.tgz", |
| | | "integrity": "sha1-I+89lTVWUgOmbO/VuDD4SJEa+0g=" |
| | | }, |
| | | "lodash.keys": { |
| | | "version": "3.1.2", |
| | |
| | | "version": "4.0.1", |
| | | "resolved": "https://registry.npmjs.org/lodash.unescape/-/lodash.unescape-4.0.1.tgz", |
| | | "integrity": "sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw=" |
| | | }, |
| | | "lodash.union": { |
| | | "version": "4.6.0", |
| | | "resolved": "https://registry.npmjs.org/lodash.union/-/lodash.union-4.6.0.tgz", |
| | | "integrity": "sha1-SLtQiECfFvGCFmZkHETdGqrjzYg=" |
| | | }, |
| | | "lodash.uniq": { |
| | | "version": "4.5.0", |
| | |
| | | } |
| | | } |
| | | }, |
| | | "readdir-glob": { |
| | | "version": "1.1.1", |
| | | "resolved": "https://registry.npmjs.org/readdir-glob/-/readdir-glob-1.1.1.tgz", |
| | | "integrity": "sha512-91/k1EzZwDx6HbERR+zucygRFfiPl2zkIYZtv3Jjr6Mn7SkKcVct8aVO+sSRiGMc6fLf72du3d92/uY63YPdEA==", |
| | | "requires": { |
| | | "minimatch": "^3.0.4" |
| | | } |
| | | }, |
| | | "readdirp": { |
| | | "version": "2.2.1", |
| | | "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", |
| | |
| | | "version": "2.0.0", |
| | | "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", |
| | | "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" |
| | | }, |
| | | "set-immediate-shim": { |
| | | "version": "1.0.1", |
| | | "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", |
| | | "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=" |
| | | }, |
| | | "set-value": { |
| | | "version": "2.0.1", |
| | |
| | | "inherits": "2" |
| | | } |
| | | }, |
| | | "tar-stream": { |
| | | "version": "2.2.0", |
| | | "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", |
| | | "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", |
| | | "requires": { |
| | | "bl": "^4.0.3", |
| | | "end-of-stream": "^1.4.1", |
| | | "fs-constants": "^1.0.0", |
| | | "inherits": "^2.0.3", |
| | | "readable-stream": "^3.1.1" |
| | | }, |
| | | "dependencies": { |
| | | "readable-stream": { |
| | | "version": "3.6.0", |
| | | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", |
| | | "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", |
| | | "requires": { |
| | | "inherits": "^2.0.3", |
| | | "string_decoder": "^1.1.1", |
| | | "util-deprecate": "^1.0.1" |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "temp": { |
| | | "version": "0.8.3", |
| | | "resolved": "https://registry.npmjs.org/temp/-/temp-0.8.3.tgz", |
| | |
| | | "version": "1.0.0", |
| | | "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", |
| | | "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" |
| | | } |
| | | } |
| | | }, |
| | | "unzipper": { |
| | | "version": "0.10.11", |
| | | "resolved": "https://registry.npmjs.org/unzipper/-/unzipper-0.10.11.tgz", |
| | | "integrity": "sha512-+BrAq2oFqWod5IESRjL3S8baohbevGcVA+teAIOYWM3pDVdseogqbzhhvvmiyQrUNKFUnDMtELW3X8ykbyDCJw==", |
| | | "requires": { |
| | | "big-integer": "^1.6.17", |
| | | "binary": "~0.3.0", |
| | | "bluebird": "~3.4.1", |
| | | "buffer-indexof-polyfill": "~1.0.0", |
| | | "duplexer2": "~0.1.4", |
| | | "fstream": "^1.0.12", |
| | | "graceful-fs": "^4.2.2", |
| | | "listenercount": "~1.0.1", |
| | | "readable-stream": "~2.3.6", |
| | | "setimmediate": "~1.0.4" |
| | | }, |
| | | "dependencies": { |
| | | "bluebird": { |
| | | "version": "3.4.7", |
| | | "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.4.7.tgz", |
| | | "integrity": "sha1-9y12C+Cbf3bQjtj66Ysomo0F+rM=" |
| | | } |
| | | } |
| | | }, |
| | |
| | | } |
| | | } |
| | | }, |
| | | "zip-stream": { |
| | | "version": "4.1.0", |
| | | "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-4.1.0.tgz", |
| | | "integrity": "sha512-zshzwQW7gG7hjpBlgeQP9RuyPGNxvJdzR8SUM3QhxCnLjWN2E7j3dOvpeDcQoETfHx0urRS7EtmVToql7YpU4A==", |
| | | "requires": { |
| | | "archiver-utils": "^2.1.0", |
| | | "compress-commons": "^4.1.0", |
| | | "readable-stream": "^3.6.0" |
| | | }, |
| | | "dependencies": { |
| | | "readable-stream": { |
| | | "version": "3.6.0", |
| | | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", |
| | | "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", |
| | | "requires": { |
| | | "inherits": "^2.0.3", |
| | | "string_decoder": "^1.1.1", |
| | | "util-deprecate": "^1.0.1" |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "zrender": { |
| | | "version": "4.1.2", |
| | | "resolved": "https://registry.npmjs.org/zrender/-/zrender-4.1.2.tgz", |
| | |
| | | "eslint-plugin-jsx-a11y": "6.2.3", |
| | | "eslint-plugin-react": "7.14.3", |
| | | "eslint-plugin-react-hooks": "^1.6.1", |
| | | "exceljs": "^4.2.1", |
| | | "file-loader": "3.0.1", |
| | | "fs-extra": "7.0.1", |
| | | "html-webpack-plugin": "4.0.0-beta.5", |
| | |
| | | "jest-environment-jsdom-fourteen": "0.1.0", |
| | | "jest-resolve": "24.8.0", |
| | | "jest-watch-typeahead": "0.3.1", |
| | | "js-table2excel": "^1.0.3", |
| | | "jsbarcode": "^3.11.3", |
| | | "jssha": "^3.2.0", |
| | | "md5": "^2.2.1", |
| | |
| | | // Type: 'S' 时 |
| | | let shaObj = new jsSHA('SHA-1', 'TEXT') |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | |
| | | let sys_datetime = sessionStorage.getItem('sys_datetime') |
| | | let app_datetime = sessionStorage.getItem('app_datetime') |
| | | if (sys_datetime && app_datetime) { |
| | | let seconds = Math.floor((new Date().getTime() - app_datetime) / 1000) |
| | | param.timestamp = moment(sys_datetime, 'YYYY-MM-DD HH:mm:ss').add(seconds, 'seconds').format('YYYY-MM-DD HH:mm:ss') |
| | | } |
| | | |
| | | shaObj.update(password) |
| | | param.Password = shaObj.getHash('HEX').toUpperCase() |
| | | param.Password = md5(username + param.Password + param.timestamp) |
| | |
| | | return Promise.reject() |
| | | } |
| | | |
| | | let curTime = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' |
| | | let sys_datetime = sessionStorage.getItem('sys_datetime') |
| | | let app_datetime = sessionStorage.getItem('app_datetime') |
| | | if (sys_datetime && app_datetime) { |
| | | let seconds = Math.floor((new Date().getTime() - app_datetime) / 1000) |
| | | curTime = moment(sys_datetime, 'YYYY-MM-DD HH:mm:ss').add(seconds, 'seconds').format('YYYY-MM-DD HH:mm:ss') + '.000' |
| | | } |
| | | |
| | | if (window.GLOB.WebSql) { |
| | | return new Promise((resolve, reject) => { |
| | | CacheUtils.getWebSqlVersion().then(msg => { |
| | | appVersion.oldVersion = msg.version || '' |
| | | let curTime = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' |
| | | let param = { |
| | | func: 's_get_app_version', |
| | | modifydate: msg.createDate || curTime, |
| | |
| | | return new Promise((resolve, reject) => { |
| | | CacheUtils.getIndexDBVersion().then(msg => { |
| | | appVersion.oldVersion = msg.version || '' |
| | | let curTime = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' |
| | | let param = { |
| | | func: 's_get_app_version', |
| | | modifydate: msg.createDate || curTime, |
| | |
| | | edition_type: 'A', |
| | | pro_sys: window.GLOB.systemType === 'production' ? 'Y' : '' |
| | | }).then(result => { |
| | | let _permAction = {} // 按钮权限 |
| | | let _permAction = {loaded: true} // 按钮权限 |
| | | |
| | | if (result && result.status) { |
| | | if (result.UserRoles_Menu) { |
| | |
| | | |
| | | this.props.modifyMenuTree(menulist) |
| | | this.props.modifyMainMenu(mainMenu) |
| | | this.props.initMenuPermission(thdMenuList) |
| | | this.props.initMenuPermission([...thdMenuList, {MenuID: 'home_page_id', EasyCode: '', MenuName: 'home', type: 'CustomPage'}]) |
| | | |
| | | resolve(_menu) |
| | | }) |
| | |
| | | |
| | | const { MonthPicker, WeekPicker, RangePicker } = DatePicker |
| | | |
| | | const Card = ({ id, card, moveCard, copyCard, findCard, editCard, delCard }) => { |
| | | const Card = ({ id, card, showField, moveCard, copyCard, findCard, editCard, delCard }) => { |
| | | const originalIndex = findCard(id).index |
| | | const [{ isDragging }, drag] = useDrag({ |
| | | item: { type: 'search', id, originalIndex }, |
| | |
| | | wrapperCol = {{xs: { span: 24 }, sm: { span: 16 }}} |
| | | label={card.labelShow !== 'false' ? card.label : ''} |
| | | required={card.required === 'true'} |
| | | help={showField ? card.field + (card.datefield ? ', ' + card.datefield : '') : ''} |
| | | > |
| | | {card.type === 'text' ? |
| | | <Input style={{marginTop: '4px'}} placeholder={card.labelShow === 'false' ? card.label : ''} value={card.initval} /> : null |
| | |
| | | import Card from './card' |
| | | import './index.scss' |
| | | |
| | | const Container = ({list, placeholder, handleList, handleMenu, deleteMenu }) => { |
| | | const Container = ({list, showField, placeholder, handleList, handleMenu, deleteMenu }) => { |
| | | const [cards, setCards] = useState(list) |
| | | const moveCard = (id, atIndex) => { |
| | | const { card, index } = findCard(id) |
| | |
| | | <Card |
| | | id={`${card.uuid}`} |
| | | card={card} |
| | | showField={showField} |
| | | moveCard={moveCard} |
| | | copyCard={copyCard} |
| | | editCard={editCard} |
| | |
| | | import React, { Component } from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Modal, notification, Popover, Icon } from 'antd' |
| | | import { Modal, notification, Popover, Icon, Switch } from 'antd' |
| | | import moment from 'moment' |
| | | |
| | | import Api from '@/api' |
| | |
| | | searchlist: null, // 搜索条件集 |
| | | sqlVerifing: false, // sql验证中 |
| | | visible: false, // 模态框控制 |
| | | showField: false, |
| | | editcard: null // 编辑中元素 |
| | | } |
| | | |
| | |
| | | }) |
| | | } |
| | | |
| | | onFieldChange = () => { |
| | | const { showField } = this.state |
| | | |
| | | this.setState({ |
| | | showField: !showField |
| | | }) |
| | | } |
| | | |
| | | clickComponent = (e) => { |
| | | if (sessionStorage.getItem('style-control') === 'true' || sessionStorage.getItem('style-control') === 'component') { |
| | | e.stopPropagation() |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { dict, card, visible, sqlVerifing } = this.state |
| | | const { dict, card, visible, sqlVerifing, showField } = this.state |
| | | let _style = resetStyle(card.style) |
| | | |
| | | return ( |
| | | <div className={`main-search-edit-list ${card.wrap.float} ${card.wrap.show || ''}`} onClick={this.clickComponent} id={card.uuid} style={_style}> |
| | | <Switch checkedChildren={dict['model.switch.open']} size="small" unCheckedChildren={dict['model.switch.close']} defaultChecked={showField} onChange={this.onFieldChange} /> |
| | | <DragElement |
| | | list={card.search} |
| | | showField={showField} |
| | | handleList={this.handleList} |
| | | handleMenu={this.handleSearch} |
| | | deleteMenu={this.deleteElement} |
| | |
| | | min-height: 50px; |
| | | position: relative; |
| | | background: #ffffff; |
| | | padding-bottom: 15px; |
| | | |
| | | >.ant-switch { |
| | | position: absolute; |
| | | z-index: 3; |
| | | right: 10px; |
| | | bottom: 5px; |
| | | } |
| | | >.anticon-tool { |
| | | position: absolute; |
| | | z-index: 3; |
| | |
| | | } |
| | | > .ant-row { |
| | | min-height: 65px; |
| | | } |
| | | .ant-row .ant-col-6 { |
| | | padding: 0 12px!important; |
| | | > .ant-col { |
| | | padding: 0 12px!important; |
| | | } |
| | | } |
| | | .ant-row.ant-form-item .ant-col { |
| | | padding: 0; |
| | |
| | | }, { |
| | | value: 'colspan', |
| | | text: '合并列' |
| | | }, { |
| | | value: 'index', |
| | | text: '序号' |
| | | }] |
| | | |
| | | if (!card.isSub) { |
| | |
| | | picture: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'blacklist', 'scale', 'lenWidRadio', 'picSort'], |
| | | colspan: ['label', 'type', 'Align', 'Hide', 'blacklist'], |
| | | custom: ['label', 'type', 'Align', 'Hide', 'Width', 'blacklist'], |
| | | action: ['label', 'type', 'Align', 'Width'] |
| | | action: ['label', 'type', 'Align', 'Width'], |
| | | index: ['label', 'type', 'Align', 'Width'] |
| | | } |
| | | |
| | | class MainSearch extends Component { |
| | |
| | | let result = await Api.genericInterface(param) |
| | | |
| | | this.getStatFieldsValue() |
| | | |
| | | |
| | | if (result.status) { |
| | | let start = 1 |
| | | if (setting.laypage) { |
| | | start = pageSize * (pageIndex - 1) + 1 |
| | | } |
| | | |
| | | this.setState({ |
| | | data: result.data.map((item, index) => { |
| | | if (absFields.length) { |
| | |
| | | item.key = index |
| | | item.$$uuid = item[setting.primaryKey] || '' |
| | | item.$$BID = BID || '' |
| | | item.$Index = start + index |
| | | |
| | | return item |
| | | }), |
| | |
| | | data = data.map(item => { |
| | | if (item.$$uuid === _data.$$uuid) { |
| | | _data.key = item.key |
| | | _data.$Index = item.$Index |
| | | return _data |
| | | } else { |
| | | return item |
| | |
| | | |
| | | class CardCellComponent extends Component { |
| | | static propTpyes = { |
| | | seq: PropTypes.any, // 序号 |
| | | cards: PropTypes.object, // 菜单配置信息 |
| | | cardCell: PropTypes.object, |
| | | data: PropTypes.object, |
| | |
| | | } |
| | | |
| | | getContent = (card) => { |
| | | const { data, cards, seq } = this.props |
| | | const { data, cards } = this.props |
| | | |
| | | if (card.eleType === 'sequence') { |
| | | return ( |
| | | <Col key={card.uuid} span={card.width}> |
| | | <div style={card.style}> |
| | | <div className={'ant-mk-text'}>{seq}</div> |
| | | <div className={'ant-mk-text'}>{data.$Index || ''}</div> |
| | | </div> |
| | | </Col> |
| | | ) |
| | |
| | | config: null, // 图表配置信息 |
| | | loading: false, // 数据加载状态 |
| | | search: null, // 搜索条件 |
| | | preIndex: 0, // 开始索引 |
| | | pageIndex: 1, // 页码 |
| | | total: 0, // 总数 |
| | | sync: false, // 是否统一请求数据 |
| | |
| | | item.key = index |
| | | item.$$uuid = item[_config.setting.primaryKey] || '' |
| | | item.$$BID = BID || '' |
| | | item.$Index = index + 1 |
| | | return item |
| | | }) |
| | | } |
| | |
| | | item.key = index |
| | | item.$$uuid = item[config.setting.primaryKey] || '' |
| | | item.$$BID = BID || '' |
| | | item.$Index = index + 1 |
| | | return item |
| | | }) |
| | | |
| | |
| | | if (config.setting.supModule && !BID) { // BID 不存在时,不做查询 |
| | | this.setState({ |
| | | data: [], |
| | | total: 0, |
| | | preIndex: 0 |
| | | total: 0 |
| | | }) |
| | | return |
| | | } |
| | |
| | | |
| | | let result = await Api.genericInterface(param) |
| | | if (result.status) { |
| | | let _preIndex = 0 |
| | | let start = 1 |
| | | if (config.setting.laypage) { |
| | | _preIndex = config.setting.pageSize * (pageIndex - 1) |
| | | start = config.setting.pageSize * (pageIndex - 1) + 1 |
| | | } |
| | | |
| | | this.setState({ |
| | |
| | | item.key = index |
| | | item.$$uuid = item[config.setting.primaryKey] || '' |
| | | item.$$BID = BID || '' |
| | | item.$Index = index + start |
| | | return item |
| | | }), |
| | | total: result.total, |
| | | preIndex: _preIndex, |
| | | loading: false |
| | | }) |
| | | } else { |
| | |
| | | }) |
| | | } |
| | | |
| | | getLines = (data, seq) => { |
| | | getLines = (data) => { |
| | | const { config } = this.state |
| | | |
| | | let line = [] |
| | |
| | | line.push( |
| | | <Col key={index} span={24}> |
| | | <div className="card-item-box" style={item.style}> |
| | | <CardCellComponent seq={seq} data={data} cards={config} cardCell={item} elements={item.elements}/> |
| | | <CardCellComponent data={data} cards={config} cardCell={item} elements={item.elements}/> |
| | | </div> |
| | | </Col> |
| | | ) |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { config, loading, data, BID, pageIndex, preIndex, total } = this.state |
| | | const { config, loading, data, BID, pageIndex, total } = this.state |
| | | |
| | | return ( |
| | | <div className="custom-table-card-box" style={{...config.style}}> |
| | |
| | | } |
| | | <NormalHeader config={config} BID={BID} menuType={this.props.menuType} refresh={this.refreshSearch} /> |
| | | {data && data.length > 0 ? <Row className="card-row-list" style={{height: config.wrap.contentHeight}}> |
| | | {data.map((item, index) => this.getLines(item, preIndex + index + 1))} |
| | | {data.map(item => this.getLines(item))} |
| | | </Row> : null} |
| | | {data && data.length === 0 ? <div className="card-row-list" style={{height: config.wrap.contentHeight}}> |
| | | <Empty description={false}/> |
| | |
| | | content = `${content.substr(0, 4)}-${content.substr(5, 2)}-${content.substr(8, 2)} ${content.substr(11, 2)}:${content.substr(14, 2)}:${content.substr(17, 2)}` |
| | | } |
| | | |
| | | content = col.prefix + content + col.postfix |
| | | content = (col.prefix || '') + content + (col.postfix || '') |
| | | } |
| | | |
| | | if (col.marks) { |
| | |
| | | if (item.rowspan === 'true') { |
| | | rowspans.push(item.field) |
| | | } |
| | | if (_format && !Math.floor(Math.random() * radio)) { |
| | | if (item.type === 'index') { |
| | | item.field = '$Index' |
| | | item.type = 'text' |
| | | } else if (_format && !Math.floor(Math.random() * radio)) { |
| | | item.blur = true |
| | | } |
| | | |
| | |
| | | item.key = index |
| | | item.$$uuid = item[_config.setting.primaryKey] || '' |
| | | item.$$BID = BID || '' |
| | | item.$Index = index + 1 |
| | | return item |
| | | }) |
| | | } |
| | |
| | | MKEmitter.emit('resetSelectLine', config.uuid, '', '') // 广播数据切换 |
| | | reset && MKEmitter.emit('resetTable', config.uuid, repage) // 列表重置 |
| | | |
| | | let start = 1 |
| | | if (setting.laypage) { |
| | | start = pageSize * (pageIndex - 1) + 1 |
| | | } |
| | | |
| | | this.setState({ |
| | | data: result.data.map((item, index) => { |
| | | item.key = index |
| | | item.$$uuid = item[setting.primaryKey] || '' |
| | | item.$$BID = BID || '' |
| | | item.$Index = start + index |
| | | return item |
| | | }), |
| | | selectedData: [], |
| | |
| | | data = data.map(item => { |
| | | if (item.$$uuid === _data.$$uuid) { |
| | | _data.key = item.key |
| | | _data.$Index = item.$Index |
| | | return _data |
| | | } else { |
| | | return item |
| | |
| | | item.key = index |
| | | item.$$uuid = item[config.setting.primaryKey] || '' |
| | | item.$$BID = BID || '' |
| | | item.$Index = index + 1 |
| | | return item |
| | | }) |
| | | |
| | |
| | | config.urlFields.forEach(field => { |
| | | let val = `'${param ? (param[field] || '') : ''}'` |
| | | regs.push({ |
| | | reg: new RegExp(field, 'ig'), |
| | | reg: new RegExp('@' + field + '@', 'ig'), |
| | | value: val |
| | | }) |
| | | }) |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { connect } from 'react-redux' |
| | | import { notification, Spin } from 'antd' |
| | | |
| | | import Api from '@/api' |
| | |
| | | state = { |
| | | loading: true, |
| | | background: sessionStorage.getItem('home_background'), |
| | | waiting: true, |
| | | view: '' |
| | | } |
| | | |
| | | componentDidMount () { |
| | | this.loadHomeConfig() |
| | | } |
| | | |
| | | UNSAFE_componentWillReceiveProps (nextProps) { |
| | | if (nextProps.permMenus.length > 0 && JSON.stringify(nextProps.permAction) !== '{}') { |
| | | this.setState({ |
| | | waiting: false |
| | | }) |
| | | } |
| | | } |
| | | |
| | | loadHomeConfig = () => { |
| | |
| | | } else { |
| | | this.setState({ |
| | | loading: false, |
| | | waiting: false, |
| | | view: 'default' |
| | | }) |
| | | } |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { loading, view, background } = this.state |
| | | const { loading, waiting, view, background } = this.state |
| | | |
| | | if (loading) { |
| | | if (loading || waiting) { |
| | | return (<div className="home-loading-view" style={{background: background}}><Spin className="home-box-spin" size="large" /></div>) |
| | | } else if (view === 'custom') { |
| | | return (<CustomPage MenuID={this.props.MenuID}/>) |
| | |
| | | } |
| | | } |
| | | |
| | | export default Home |
| | | const mapStateToProps = (state) => { |
| | | return { |
| | | permAction: state.permAction, |
| | | permMenus: state.permMenus |
| | | } |
| | | } |
| | | |
| | | const mapDispatchToProps = () => { |
| | | return {} |
| | | } |
| | | |
| | | export default connect(mapStateToProps, mapDispatchToProps)(Home) |
| | |
| | | this.getStatFieldsValue(searches) |
| | | |
| | | if (result.status) { |
| | | let start = 1 |
| | | if (setting.laypage) { |
| | | start = pageSize * (pageIndex - 1) + 1 |
| | | } |
| | | |
| | | this.setState({ |
| | | data: result.data.map((item, index) => { |
| | | if (absFields.length) { |
| | |
| | | item.key = index |
| | | item.$$uuid = item[setting.primaryKey] || '' |
| | | item.$$BID = BID || '' |
| | | item.$Index = start + index |
| | | |
| | | return item |
| | | }), |
| | |
| | | data = data.map(item => { |
| | | if (item.$$uuid === _data.$$uuid) { |
| | | _data.key = item.key |
| | | _data.$Index = item.$Index |
| | | return _data |
| | | } else { |
| | | return item |
| | |
| | | this.getStatFieldsValue(searches) |
| | | |
| | | if (result.status) { |
| | | let start = 1 |
| | | if (setting.laypage) { |
| | | start = pageSize * (pageIndex - 1) + 1 |
| | | } |
| | | |
| | | this.setState({ |
| | | data: result.data.map((item, index) => { |
| | | if (absFields.length) { |
| | |
| | | item.key = index |
| | | item.$$uuid = item[setting.primaryKey] || '' |
| | | item.$$BID = BID || '' |
| | | item.$Index = start + index |
| | | |
| | | return item |
| | | }), |
| | |
| | | |
| | | table.push(_topRow) |
| | | |
| | | if (data && abses.length > 0) { |
| | | data.forEach(item => { |
| | | let _row = {} |
| | | _header.forEach(field => { |
| | | if (item[field] && abses.includes(field)) { |
| | | _row[field] = Math.abs(item[field]) |
| | | } else { |
| | | _row[field] = item[field] |
| | | } |
| | | }) |
| | | |
| | | table.push(_row) |
| | | }) |
| | | } else if (data) { |
| | | data.forEach(item => { |
| | | let _row = {} |
| | | _header.forEach(field => { |
| | | data && data.forEach((item, index) => { |
| | | let _row = {} |
| | | |
| | | item.$Index = index + 1 |
| | | |
| | | _header.forEach(field => { |
| | | if (item[field] && abses.includes(field)) { |
| | | _row[field] = Math.abs(item[field]) |
| | | } else { |
| | | _row[field] = item[field] |
| | | }) |
| | | |
| | | table.push(_row) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | table.push(_row) |
| | | }) |
| | | |
| | | const ws = XLSX.utils.json_to_sheet(table, {header: _header, skipHeader: true}) |
| | | |
| | |
| | | subObjs.push(val) |
| | | } |
| | | } else { |
| | | if (typeof(val) === 'string') { |
| | | val = val.replace(/'/ig, '"') |
| | | } |
| | | keys.push(key) |
| | | vals.push(`'${val}'`) |
| | | } |
| | |
| | | } |
| | | |
| | | state = { |
| | | datatype: null, // 数据类型 |
| | | readtype: null, // 是否只读 |
| | | readin: null, // 行数据是否写入 |
| | | writein: null, // 执行时是否填入默认sql |
| | | fieldlen: null, // 字段长度 |
| | | formlist: [], // 表单项 |
| | | intercepts: [], // 截取字段 |
| | | record: {} // 记录下拉表单关联字段,用于数据写入 |
| | | } |
| | | |
| | | componentDidMount () { |
| | | const { data, BData, action } = this.props |
| | | |
| | | let datatype = {} |
| | | let readtype = {} |
| | | let readin = {} |
| | | let writein = {} |
| | | let fieldlen = {} |
| | | let intercepts = [] |
| | | let _inputfields = [] |
| | | let linkFields = {} // 关联菜单 |
| | | let supItemVal = {} // 上级菜单初始值 |
| | |
| | | linkFields[item.linkField] = linkFields[item.linkField] || [] |
| | | linkFields[item.linkField].push(item.field) |
| | | } |
| | | if (item.interception === 'true') { // 字符截取字段 |
| | | intercepts.push(item.field) |
| | | } |
| | | }) |
| | | |
| | | formlist = formlist.map(item => { |
| | |
| | | if (item.type === 'split' || item.type === 'hint') return item |
| | | |
| | | // 数据自动填充 |
| | | let _readin = item.readin !== 'false' |
| | | item.readin = item.readin !== 'false' |
| | | if (item.type === 'linkMain' || item.type === 'funcvar') { |
| | | _readin = false |
| | | item.readin = false |
| | | } |
| | | item.readonly = item.readonly === 'true' |
| | | item.writein = item.writein !== 'false' |
| | | |
| | | let _fieldlen = item.fieldlength || 50 |
| | | if (item.type === 'textarea' || item.type === 'fileupload' || item.type === 'multiselect' || item.type === 'brafteditor') { |
| | | _fieldlen = item.fieldlength || 512 |
| | | } else if (item.type === 'number') { |
| | | _fieldlen = item.decimal ? item.decimal : 0 |
| | | item.fieldlength = item.fieldlength || 50 |
| | | if (item.type === 'number') { |
| | | item.fieldlength = item.decimal ? item.decimal : 0 |
| | | item.initval = item.initval || 0 |
| | | } |
| | | |
| | | datatype[item.field] = item.type |
| | | readtype[item.field] = item.readonly === 'true' |
| | | readin[item.field] = _readin |
| | | writein[item.field] = item.writein !== 'false' |
| | | fieldlen[item.field] = _fieldlen |
| | | |
| | | if (item.setAll === 'true' && (item.type === 'select' || item.type === 'link' || item.type === 'radio')) { // 添加空值 |
| | | item.options.unshift({ |
| | |
| | | |
| | | if (item.type === 'linkMain') { |
| | | newval = BData && BData[item.field] ? BData[item.field] : '' |
| | | } else if (_readin && !/^date/.test(item.type) && data && data.hasOwnProperty(item.field)) { |
| | | } else if (item.readin && !/^date/.test(item.type) && data && data.hasOwnProperty(item.field)) { |
| | | newval = data[item.field] |
| | | } else if (item.type === 'date') { // 时间搜索 |
| | | if (_readin && data && data.hasOwnProperty(item.field)) { |
| | | if (item.readin && data && data.hasOwnProperty(item.field)) { |
| | | newval = data[item.field] |
| | | } |
| | | if (newval) { |
| | |
| | | newval = null |
| | | } |
| | | } else if (item.type === 'datemonth') { |
| | | if (_readin && data && data.hasOwnProperty(item.field)) { |
| | | if (item.readin && data && data.hasOwnProperty(item.field)) { |
| | | newval = data[item.field] |
| | | } |
| | | if (newval) { |
| | |
| | | newval = null |
| | | } |
| | | } else if (item.type === 'datetime') { |
| | | if (_readin && data && data.hasOwnProperty(item.field)) { |
| | | if (item.readin && data && data.hasOwnProperty(item.field)) { |
| | | newval = data[item.field] |
| | | } |
| | | if (newval) { |
| | |
| | | }) |
| | | |
| | | this.setState({ |
| | | readin, |
| | | writein, |
| | | readtype, |
| | | datatype, |
| | | fieldlen, |
| | | intercepts, |
| | | formlist |
| | | }, () => { |
| | | if (action.setting && action.setting.focus) { |
| | |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'text') { |
| | | let _max = item.fieldlength || 50 |
| | | let _max = item.fieldlength |
| | | let _rules = [{ |
| | | pattern: /^[^']*$/ig, |
| | | message: formRule.input.quotemsg |
| | |
| | | }, |
| | | ..._rules |
| | | ] |
| | | })(<Input placeholder="" autoComplete="off" disabled={item.readonly === 'true'} onChange={(e) => this.handleChange(e, item)} onPressEnter={(e) => this.handleInputSubmit(e, item)} />)} |
| | | })(<Input placeholder="" autoComplete="off" disabled={item.readonly} onChange={(e) => this.handleChange(e, item)} onPressEnter={(e) => this.handleInputSubmit(e, item)} />)} |
| | | </Form.Item> |
| | | </Col> |
| | | ) |
| | |
| | | ] |
| | | })( |
| | | precision === null ? |
| | | <InputNumber disabled={item.readonly === 'true'} onPressEnter={(e) => this.handleInputSubmit(e, item)} /> : |
| | | <InputNumber precision={precision} disabled={item.readonly === 'true'} onPressEnter={(e) => this.handleInputSubmit(e, item)} /> |
| | | <InputNumber disabled={item.readonly} onPressEnter={(e) => this.handleInputSubmit(e, item)} /> : |
| | | <InputNumber precision={precision} disabled={item.readonly} onPressEnter={(e) => this.handleInputSubmit(e, item)} /> |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | |
| | | } |
| | | ] |
| | | })( |
| | | <Checkbox.Group disabled={item.readonly === 'true'}> |
| | | <Checkbox.Group disabled={item.readonly}> |
| | | {item.options.map(option => <Checkbox key={option.key} title={option.Text} value={option.Value}>{option.Text}</Checkbox>)} |
| | | </Checkbox.Group> |
| | | )} |
| | |
| | | } |
| | | ] |
| | | })( |
| | | <Radio.Group disabled={item.readonly === 'true'} onChange={(e) => {this.selectChange(item, e.target.value)}}> |
| | | <Radio.Group disabled={item.readonly} onChange={(e) => {this.selectChange(item, e.target.value)}}> |
| | | {item.options.map(option => <Radio key={option.key} value={option.Value}>{option.Text}</Radio>)} |
| | | </Radio.Group> |
| | | )} |
| | |
| | | allowClear={true} |
| | | filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0 || option.props.value.toLowerCase().indexOf(input.toLowerCase()) >= 0} |
| | | onSelect={(value) => {this.selectChange(item, value)}} |
| | | disabled={item.readonly === 'true'} |
| | | disabled={item.readonly} |
| | | > |
| | | {item.options.map(option => |
| | | <Select.Option id={option.key} title={option.Text} key={option.key} value={option.Value}>{option.Text}</Select.Option> |
| | |
| | | showSearch |
| | | mode="multiple" |
| | | filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0 || option.props.value.toLowerCase().indexOf(input.toLowerCase()) >= 0} |
| | | disabled={item.readonly === 'true'} |
| | | disabled={item.readonly} |
| | | > |
| | | {item.options.map(option => |
| | | <Select.Option id={option.key} title={option.Text} key={option.key} value={option.Value}>{option.Text}</Select.Option> |
| | |
| | | } |
| | | ] |
| | | })( |
| | | <DatePicker disabled={item.readonly === 'true'} /> |
| | | <DatePicker disabled={item.readonly} /> |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | |
| | | } |
| | | ] |
| | | })( |
| | | <MonthPicker disabled={item.readonly === 'true'} /> |
| | | <MonthPicker disabled={item.readonly} /> |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | |
| | | } |
| | | ] |
| | | })( |
| | | <DatePicker showTime disabled={item.readonly === 'true'} /> |
| | | <DatePicker showTime disabled={item.readonly} /> |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'fileupload') { |
| | | let filelist = this.props.data ? this.props.data[item.field] : item.initval |
| | | if (filelist && this.state.readin[item.field]) { |
| | | if (filelist && item.readin) { |
| | | try { |
| | | filelist = filelist.split(',').map((url, index) => { |
| | | return { |
| | |
| | | message: this.props.dict['form.required.input'] + item.label + '!' |
| | | } |
| | | ] |
| | | })(<Input placeholder="" autoComplete="off" disabled={item.readonly === 'true'} />)} |
| | | })(<Input placeholder="" autoComplete="off" disabled={item.readonly} />)} |
| | | </Form.Item> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'funcvar') { |
| | | // 函数变量字段,默认不显示 |
| | | } else if (item.type === 'textarea') { |
| | | let _max = item.fieldlength || 512 |
| | | let _max = item.fieldlength |
| | | let _rules = [] |
| | | if (item.encryption !== 'true') { |
| | | _rules = [{ |
| | |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'brafteditor') { |
| | | let _max = item.fieldlength || 512 |
| | | let _max = item.fieldlength |
| | | |
| | | fields.push( |
| | | <Col span={item.span || 24} key={index}> |
| | |
| | | } |
| | | |
| | | handleConfirm = () => { |
| | | const { record, intercepts, writein } = this.state |
| | | const { record, formlist } = this.state |
| | | let _format = { |
| | | date: 'YYYY-MM-DD', |
| | | datemonth: 'YYYY-MM', |
| | |
| | | this.props.form.validateFieldsAndScroll((err, values) => { |
| | | if (!err) { |
| | | let search = [] |
| | | // 隐藏表单 |
| | | this.state.formlist.forEach(item => { |
| | | formlist.forEach(item => { |
| | | if (!item.field) return |
| | | |
| | | let _item = null |
| | | |
| | | let _item = { |
| | | type: item.type, |
| | | readonly: item.readonly, |
| | | readin: item.readin, |
| | | writein: item.writein, |
| | | fieldlen: item.fieldlength, |
| | | key: item.field |
| | | } |
| | | |
| | | if (item.type === 'funcvar') { |
| | | _item = { |
| | | type: 'funcvar', |
| | | readonly: 'true', |
| | | readin: false, |
| | | writein: writein[item.field], |
| | | fieldlen: this.state.fieldlen[item.field], |
| | | key: item.field, |
| | | value: '' |
| | | } |
| | | } else if (item.hidden === 'true') { |
| | | _item.value = '' |
| | | } else if (item.hidden === 'true' || (item.supField && !item.supvalue.includes(this.props.form.getFieldValue(item.supField)))) { |
| | | let _val = item.initval |
| | | if (record.hasOwnProperty(item.field)) { |
| | | _val = record[item.field] |
| | | } |
| | | |
| | | _item = { |
| | | type: this.state.datatype[item.field], |
| | | readonly: this.state.readtype[item.field], |
| | | readin: this.state.readin[item.field], |
| | | writein: writein[item.field], |
| | | fieldlen: this.state.fieldlen[item.field], |
| | | key: item.field, |
| | | value: _val |
| | | _item.value = _val |
| | | |
| | | if (['date', 'datemonth', 'datetime'].includes(item.type)) { |
| | | if (!_item.value) { |
| | | _item.value = '' |
| | | } else if (_item.value.format) { |
| | | _item.value = _item.value.format(_format[item.type]) |
| | | } |
| | | |
| | | if (item.declareType === 'nvarchar(50)') { |
| | | _item.type = 'text' |
| | | } |
| | | } else if (item.type === 'text' && _item.value && typeof(_item.value) === 'string') { // 特殊字段替换 |
| | | _item.value = _item.value.replace(/^(\s*)@appkey@(\s*)$/ig, window.GLOB.appkey) |
| | | _item.value = _item.value.replace(/^(\s*)@SessionUid@(\s*)$/ig, (localStorage.getItem('SessionUid') || '')) |
| | | _item.value = _item.value.replace(/^(\s*)@bid@(\s*)$/ig, (this.props.BID || '')) |
| | | } |
| | | } else if (item.supField && !item.supvalue.includes(this.props.form.getFieldValue(item.supField))) { |
| | | _item = { |
| | | type: this.state.datatype[item.field], |
| | | readonly: this.state.readtype[item.field], |
| | | readin: this.state.readin[item.field], |
| | | writein: writein[item.field], |
| | | fieldlen: this.state.fieldlen[item.field], |
| | | key: item.field, |
| | | value: item.initval |
| | | } else if (typeof(values[item.field]) !== 'undefined') { |
| | | let _value = values[item.field] |
| | | |
| | | if (item.type === 'datetime') { |
| | | _value = _value ? moment(_value).format('YYYY-MM-DD HH:mm:ss') : '' |
| | | if (item.declareType === 'nvarchar(50)') { |
| | | _item.type = 'text' |
| | | } |
| | | } else if (item.type === 'datemonth') { |
| | | _value = _value ? moment(_value).format('YYYY-MM') : '' |
| | | if (item.declareType === 'nvarchar(50)') { |
| | | _item.type = 'text' |
| | | } |
| | | } else if (item.type === 'date') { |
| | | _value = _value ? moment(_value).format('YYYY-MM-DD') : '' |
| | | if (item.declareType === 'nvarchar(50)') { |
| | | _item.type = 'text' |
| | | } |
| | | } else if (item.type === 'multiselect' || item.type === 'checkbox') { |
| | | _value = _value ? _value.join(',') : '' |
| | | |
| | | } else if (item.type === 'fileupload') { |
| | | let vals = [] |
| | | |
| | | if (_value && _value.length > 0) { |
| | | _value.forEach(_val => { |
| | | if (_val.origin && _val.url) { |
| | | vals.push(_val.url) |
| | | } else if (!_val.origin && _val.status === 'done' && _val.response) { |
| | | vals.push(_val.response) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | _value = vals.join(',') |
| | | } else if (item.type === 'text' || item.type === 'textarea') { |
| | | _value = _value.replace(/\t*|\v*/g, '') // 去除制表符 |
| | | |
| | | if (item.interception === 'true') { // 去除首尾空格 |
| | | _value = _value.replace(/(^\s*|\s*$)/g, '') |
| | | } |
| | | |
| | | if (item.type === 'text' && _value) { // 特殊字段替换 |
| | | _value = _value.replace(/^(\s*)@appkey@(\s*)$/ig, window.GLOB.appkey) |
| | | _value = _value.replace(/^(\s*)@SessionUid@(\s*)$/ig, (localStorage.getItem('SessionUid') || '')) |
| | | _value = _value.replace(/^(\s*)@bid@(\s*)$/ig, (this.props.BID || '')) |
| | | } |
| | | } |
| | | _item.value = _value |
| | | } else { |
| | | _item.value = '' |
| | | } |
| | | |
| | | if (!_item) return |
| | | |
| | | |
| | | if (_item.value === undefined) { |
| | | _item.value = '' |
| | | } else if (item.type === 'date' || item.type === 'datemonth' || item.type === 'datetime') { |
| | | if (!_item.value) { |
| | | _item.value = '' |
| | | } else if (_item.value.format) { |
| | | _item.value = _item.value.format(_format[item.type]) |
| | | } |
| | | } else if (item.type === 'text' && _item.value && typeof(_item.value) === 'string') { // 特殊字段替换 |
| | | _item.value = _item.value.replace(/^(\s*)@appkey@(\s*)$/ig, window.GLOB.appkey) |
| | | _item.value = _item.value.replace(/^(\s*)@SessionUid@(\s*)$/ig, (localStorage.getItem('SessionUid') || '')) |
| | | _item.value = _item.value.replace(/^(\s*)@bid@(\s*)$/ig, (this.props.BID || '')) |
| | | } |
| | | |
| | | |
| | | search.push(_item) |
| | | }) |
| | | |
| | | Object.keys(values).forEach(key => { |
| | | if (values[key] === undefined) { // 表单异常??? |
| | | if (search.filter(s => s.key === key).length === 0) { |
| | | search.push({ |
| | | type: this.state.datatype[key], |
| | | readonly: this.state.readtype[key], |
| | | readin: this.state.readin[key], |
| | | writein: writein[key], |
| | | fieldlen: this.state.fieldlen[key], |
| | | key: key, |
| | | value: '' |
| | | }) |
| | | } |
| | | return |
| | | } |
| | | |
| | | let _value = '' |
| | | let _type = this.state.datatype[key] |
| | | if (_type === 'datetime') { |
| | | _value = values[key] ? moment(values[key]).format('YYYY-MM-DD HH:mm:ss') : '' |
| | | } else if (_type === 'datemonth') { |
| | | _value = values[key] ? moment(values[key]).format('YYYY-MM') : '' |
| | | } else if (_type === 'date') { |
| | | _value = values[key] ? moment(values[key]).format('YYYY-MM-DD') : '' |
| | | } else if (_type === 'number') { |
| | | _value = values[key] |
| | | |
| | | } else if (_type === 'multiselect' || _type === 'checkbox') { |
| | | _value = values[key] ? values[key].join(',') : '' |
| | | |
| | | } else if (_type === 'fileupload') { |
| | | let vals = [] |
| | | |
| | | if (values[key] && values[key].length > 0) { |
| | | values[key].forEach(_val => { |
| | | if (_val.origin && _val.url) { |
| | | vals.push(_val.url) |
| | | } else if (!_val.origin && _val.status === 'done' && _val.response) { |
| | | vals.push(Utils.getrealurl(_val.response)) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | _value = vals.join(',') |
| | | } else if (_type === 'text' || _type === 'textarea') { |
| | | _value = values[key].replace(/\t*|\v*/g, '') // 去除制表符 |
| | | |
| | | if (intercepts.includes(key)) { // 去除首尾空格 |
| | | _value = _value.replace(/(^\s*|\s*$)/g, '') |
| | | } |
| | | if (_type === 'text' && _value) { // 特殊字段替换 |
| | | _value = _value.replace(/^(\s*)@appkey@(\s*)$/ig, window.GLOB.appkey) |
| | | _value = _value.replace(/^(\s*)@SessionUid@(\s*)$/ig, (localStorage.getItem('SessionUid') || '')) |
| | | _value = _value.replace(/^(\s*)@bid@(\s*)$/ig, (this.props.BID || '')) |
| | | } |
| | | } else { |
| | | _value = values[key] |
| | | } |
| | | |
| | | if (_value === undefined) { |
| | | _value = '' |
| | | } |
| | | |
| | | search.push({ |
| | | type: this.state.datatype[key], |
| | | readonly: this.state.readtype[key], |
| | | readin: this.state.readin[key], |
| | | writein: writein[key], |
| | | fieldlen: this.state.fieldlen[key], |
| | | key: key, |
| | | value: _value |
| | | }) |
| | | }) |
| | | |
| | | resolve(search) |
| | |
| | | if (item.rowspan === 'true') { |
| | | rowspans.push(item.field) |
| | | } |
| | | if (_format && !Math.floor(Math.random() * radio)) { |
| | | if (item.type === 'index') { |
| | | item.field = '$Index' |
| | | item.type = 'text' |
| | | } else if (_format && !Math.floor(Math.random() * radio)) { |
| | | item.blur = true |
| | | } |
| | | |
| | |
| | | render: (text, record) => { |
| | | return this.getContent(item, record) |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (item.fixed === true || item.fixed === 'true') { |
| | | if (index < columns.length / 2) { |
| | | cell.fixed = 'left' |
| | | } else { |
| | | cell.fixed = 'right' |
| | | } |
| | | } |
| | | |
| | |
| | | label: CommonDict['model.form.colspan'], |
| | | subType: 'colspan', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'columns', |
| | | label: '序号', |
| | | subType: 'index', |
| | | url: '' |
| | | } |
| | | ] |
| | | |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { Form, Row, Col, Button, Input, InputNumber } from 'antd' |
| | | import { Form, Row, Col, Button, Input, InputNumber, Radio } from 'antd' |
| | | import './index.scss' |
| | | |
| | | class ExcelOutColumn extends Component { |
| | |
| | | return ( |
| | | <Form {...formItemLayout} className="verify-form"> |
| | | <Row gutter={24}> |
| | | <Col span={7}> |
| | | <Col span={5}> |
| | | <Form.Item label={dict['model.form.field']}> |
| | | {getFieldDecorator('Column', { |
| | | initialValue: '', |
| | |
| | | })(<Input placeholder="" autoComplete="off" />)} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={7}> |
| | | <Col span={5}> |
| | | <Form.Item label={dict['model.name']}> |
| | | {getFieldDecorator('Text', { |
| | | initialValue: '', |
| | |
| | | })(<Input placeholder="" autoComplete="off" />)} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={7}> |
| | | <Col span={5}> |
| | | <Form.Item label={dict['model.form.columnWidth']}> |
| | | {getFieldDecorator('Width', { |
| | | initialValue: 20, |
| | |
| | | })(<InputNumber min={5} max={200} precision={0} />)} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={3} className="add"> |
| | | <Col span={5}> |
| | | <Form.Item label="类型"> |
| | | {getFieldDecorator('type', { |
| | | initialValue: 'text' |
| | | })( |
| | | <Radio.Group> |
| | | <Radio value="text">文本</Radio> |
| | | <Radio value="image">图片</Radio> |
| | | </Radio.Group> |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={4} className="add"> |
| | | <Button onClick={this.handleConfirm} type="primary" className="mk-green"> |
| | | 添加 |
| | | </Button> |
| | |
| | | inputType: 'input', |
| | | editable: true, |
| | | unique: true, |
| | | width: '25%' |
| | | width: '20%' |
| | | }, |
| | | { |
| | | title: this.props.dict['model.name'], |
| | | dataIndex: 'Text', |
| | | inputType: 'input', |
| | | editable: true, |
| | | width: '25%' |
| | | width: '20%' |
| | | }, |
| | | { |
| | | title: this.props.dict['model.form.columnWidth'], |
| | |
| | | min: 5, |
| | | max: 200, |
| | | editable: true, |
| | | width: '25%' |
| | | width: '20%' |
| | | }, |
| | | { |
| | | title: '类型', |
| | | dataIndex: 'type', |
| | | inputType: 'select', |
| | | editable: true, |
| | | required: false, |
| | | width: '20%', |
| | | render: (text) => { |
| | | if (text === 'image') { |
| | | return '图片' |
| | | } else { |
| | | return '文本' |
| | | } |
| | | }, |
| | | options: [ |
| | | {value: 'text', text: '文本'}, |
| | | {value: 'image', text: '图片'} |
| | | ] |
| | | }, |
| | | { |
| | | title: '取绝对值', |
| | |
| | | inputType: 'select', |
| | | editable: true, |
| | | required: false, |
| | | width: '25%', |
| | | width: '20%', |
| | | render: (text) => { |
| | | if (text === 'true') { |
| | | return '是' |
| | |
| | | |
| | | if (card.intertype !== 'system') { |
| | | _verify.enable = 'false' |
| | | } |
| | | if (_verify.columns[0] && !_verify.columns[0].type) { |
| | | _verify.columns = _verify.columns.map(col => { |
| | | col.type = col.type || 'text' |
| | | return col |
| | | }) |
| | | } |
| | | |
| | | let defaultscript = '' |
| | |
| | | Text: item.label, |
| | | Width: 20, |
| | | abs: 'false', |
| | | type: 'text', |
| | | uuid: Utils.getuuid() |
| | | }) |
| | | }) |
| | |
| | | <Button className="excel-col-add mk-red" title="清空Excel列" onClick={this.clearField}> |
| | | 清空Excel列 |
| | | </Button> |
| | | <div style={{color: '#959595', fontSize: '13px', paddingLeft: '10px'}}>如需导出序号,请使用字段 $Index。</div> |
| | | <EditTable actions={['edit', 'move', 'copy', 'del']} type="exceloutcolumn" data={verify.columns} columns={excelColumns} onChange={(columns) => this.setState({verify: {...verify, columns}})}/> |
| | | </TabPane> |
| | | {card.intertype === 'system' ? <TabPane tab={ |
| | |
| | | number: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'decimal', 'format', 'prefix', 'postfix', 'blacklist', 'perspective', 'sum', 'rowspan'], |
| | | link: ['label', 'field', 'type', 'nameField', 'Align', 'Hide', 'IsSort', 'joint', 'Width', 'fieldlength', 'blacklist'], |
| | | textarea: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'prefix', 'postfix', 'fieldlength', 'blacklist'], |
| | | picture: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'fieldlength', 'blacklist', 'scale', 'maxHeight'] |
| | | picture: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'fieldlength', 'blacklist', 'scale', 'maxHeight'], |
| | | index: ['label', 'type', 'Align', 'Width'] |
| | | } |
| | | |
| | | class MainSearch extends Component { |
| | |
| | | } else if (type === 'columns') { |
| | | // 添加显示列,字段集中存在显示列字段,使用显示列对象替换字段集,设置数据类型 |
| | | config.columns.forEach(item => { |
| | | if (columns.has(item.field.toLowerCase())) { |
| | | if (item.field && columns.has(item.field.toLowerCase())) { |
| | | let _datatype = columns.get(item.field.toLowerCase()).datatype |
| | | columns.set(item.field.toLowerCase(), {...item, selected: true, datatype: _datatype}) |
| | | } |
| | |
| | | config.search = items |
| | | } else if (type === 'columns') { |
| | | config.columns.forEach(item => { |
| | | if (columnsMap.has(item.field.toLowerCase())) { |
| | | if (item.field && columnsMap.has(item.field.toLowerCase())) { |
| | | let cell = columnsMap.get(item.field.toLowerCase()) |
| | | |
| | | if (cell.selected) { |
| | |
| | | |
| | | const { MonthPicker, WeekPicker, RangePicker } = DatePicker |
| | | |
| | | const Card = ({ id, card, moveCard, copyCard, findCard, editCard, delCard }) => { |
| | | const Card = ({ id, card, showField, moveCard, copyCard, findCard, editCard, delCard }) => { |
| | | const originalIndex = findCard(id).index |
| | | const [{ isDragging }, drag] = useDrag({ |
| | | item: { type: 'search', id, originalIndex }, |
| | |
| | | wrapperCol = {{xs: { span: 24 }, sm: { span: 16 }}} |
| | | label={card.labelShow !== 'false' ? card.label : ''} |
| | | required={card.required === 'true'} |
| | | help={showField ? card.field + (card.datefield ? ', ' + card.datefield : '') : ''} |
| | | > |
| | | {card.type === 'text' ? |
| | | <Input style={{marginTop: '4px'}} value={card.initval} /> : null |
| | |
| | | import Card from './card' |
| | | import './index.scss' |
| | | |
| | | const Container = ({list, placeholder, handleList, handleMenu, deleteMenu }) => { |
| | | const Container = ({list, placeholder, showField, handleList, handleMenu, deleteMenu }) => { |
| | | const [cards, setCards] = useState(list) |
| | | const moveCard = (id, atIndex) => { |
| | | const { card, index } = findCard(id) |
| | |
| | | <Card |
| | | id={`${card.uuid}`} |
| | | card={card} |
| | | showField={showField} |
| | | moveCard={moveCard} |
| | | copyCard={copyCard} |
| | | editCard={editCard} |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Icon, Tooltip, Modal, notification } from 'antd' |
| | | import { Icon, Tooltip, Modal, notification, Switch } from 'antd' |
| | | import moment from 'moment' |
| | | |
| | | import Api from '@/api' |
| | |
| | | searchlist: null, // 搜索条件集 |
| | | sqlVerifing: false, // sql验证中 |
| | | visible: false, // 模态框控制 |
| | | showField: false, |
| | | card: null // 编辑中元素 |
| | | } |
| | | |
| | |
| | | }) |
| | | } |
| | | |
| | | onFieldChange = () => { |
| | | const { showField } = this.state |
| | | |
| | | this.setState({ |
| | | showField: !showField |
| | | }) |
| | | } |
| | | |
| | | |
| | | /** |
| | | * @description 组件销毁,清除state更新 |
| | | */ |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { dict, searchlist, visible, sqlVerifing, card } = this.state |
| | | const { dict, searchlist, visible, sqlVerifing, card, showField } = this.state |
| | | |
| | | return ( |
| | | <div className={'model-table-search-list length' + searchlist.length}> |
| | | <Tooltip placement="bottomLeft" overlayClassName="middle" title={dict['model.tooltip.search.guide']}> |
| | | <Icon type="question-circle" /> |
| | | </Tooltip> |
| | | <Switch checkedChildren={dict['model.switch.open']} unCheckedChildren={dict['model.switch.close']} defaultChecked={showField} onChange={this.onFieldChange} /> |
| | | <DragElement |
| | | list={searchlist} |
| | | showField={showField} |
| | | handleList={this.handleList} |
| | | handleMenu={this.handleSearch} |
| | | deleteMenu={this.deleteElement} |
| | |
| | | .model-table-search-list { |
| | | padding: 1px 24px 20px; |
| | | min-height: 87px; |
| | | position: relative; |
| | | border-bottom: 1px solid #d9d9d9; |
| | | |
| | | .anticon-question-circle { |
| | |
| | | left: -15px; |
| | | top: 5px; |
| | | } |
| | | >.ant-switch { |
| | | position: absolute; |
| | | z-index: 1; |
| | | right: 20px; |
| | | bottom: 10px; |
| | | } |
| | | > .ant-row { |
| | | min-height: 65px; |
| | | } |
| | |
| | | label: CommonDict['model.form.colspan'], |
| | | subType: 'colspan', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'columns', |
| | | label: '序号', |
| | | subType: 'index', |
| | | url: '' |
| | | } |
| | | ] |
| | | } |
| | |
| | | }, { |
| | | value: 'textarea', |
| | | text: Formdict['model.form.textarea'] |
| | | }, { |
| | | value: 'index', |
| | | text: '序号' |
| | | }] |
| | | }, |
| | | { |
| | |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'declareType', |
| | | label: '数据类型', |
| | | tooltip: '声明变量时的类型,时间格式datetime或文本格式nvarchar(50)。', |
| | | initVal: card.declareType || 'datetime', |
| | | options: [{ |
| | | value: 'datetime', |
| | | text: 'datetime' |
| | | }, { |
| | | value: 'nvarchar(50)', |
| | | text: 'nvarchar(50)' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'number', |
| | | key: 'span', |
| | | min: 1, |
| | |
| | | link: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'setAll', 'linkField', 'span', 'labelwidth', 'tooltip', 'extra', 'emptyText', 'enter'], |
| | | fileupload: ['readonly', 'required', 'readin', 'fieldlength', 'maxfile', 'fileType', 'span', 'labelwidth', 'tooltip', 'extra', 'suffix'], |
| | | switch: ['initval', 'openVal', 'closeVal', 'openText', 'closeText', 'readonly', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra'], |
| | | date: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra'], |
| | | datemonth: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra'], |
| | | datetime: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra'], |
| | | date: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType'], |
| | | datemonth: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType'], |
| | | datetime: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType'], |
| | | textarea: ['initval', 'readonly', 'required', 'hidden', 'readin', 'fieldlength', 'span', 'labelwidth', 'maxRows', 'encryption', 'interception', 'tooltip', 'extra'], |
| | | color: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra'], |
| | | hint: ['label', 'type', 'blacklist', 'message', 'span', 'labelwidth'], |
| | |
| | | subObjs.push(val) |
| | | } |
| | | } else { |
| | | if (typeof(val) === 'string') { |
| | | val = val.replace(/'/ig, '"') |
| | | } |
| | | keys.push(key) |
| | | vals.push(`'${val}'`) |
| | | } |
| | |
| | | config.width = pageParam[config.pageSize][config.pageLayout] |
| | | config.style.height = Math.floor(config.width * pageParam[config.pageSize][config.pageLayout + config.pagePadding]) |
| | | |
| | | if (config.printCustom === 'true' && config.printWidth && config.printHeight) { |
| | | config.width = config.printWidth |
| | | config.style.height = config.printHeight |
| | | } |
| | | |
| | | let params = [] |
| | | let _pars = [] |
| | | |
| | |
| | | } |
| | | |
| | | sessionStorage.setItem('home_background', res.index_background_color) |
| | | sessionStorage.setItem('sys_datetime', res.sys_datetime) |
| | | sessionStorage.setItem('app_datetime', new Date().getTime()) |
| | | |
| | | // url标题 |
| | | document.title = systemMsg.platTitle |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { Form, Row, Col, Radio, Icon, Tooltip, InputNumber } from 'antd' |
| | | import { Form, Row, Col, Radio, Icon, Tooltip, InputNumber, notification } from 'antd' |
| | | |
| | | import Api from '@/api' |
| | | import options from '@/store/options.js' |
| | | import './index.scss' |
| | | |
| | | class CustomMenuForm extends Component { |
| | |
| | | updateConfig: PropTypes.func |
| | | } |
| | | |
| | | state = { |
| | | menulist: [] |
| | | } |
| | | |
| | | UNSAFE_componentWillMount () { |
| | | let _param = {func: 's_get_pc_menus', systemType: options.sysType, debug: 'Y'} |
| | | _param.pro_sys = window.GLOB.systemType === 'production' ? 'Y' : '' |
| | | |
| | | Api.getSystemConfig(_param).then(result => { |
| | | if (result.status) { |
| | | let menulist = result.fst_menu.map(fst => { |
| | | let fstItem = { |
| | | MenuID: fst.MenuID, |
| | | MenuName: fst.MenuName, |
| | | value: fst.MenuID, |
| | | label: fst.MenuName, |
| | | isLeaf: false, |
| | | children: [] |
| | | } |
| | | |
| | | if (fst.snd_menu) { |
| | | fstItem.children = fst.snd_menu.map(snd => { |
| | | let sndItem = { |
| | | ParentId: fst.MenuID, |
| | | MenuID: snd.MenuID, |
| | | MenuName: snd.MenuName, |
| | | value: snd.MenuID, |
| | | label: snd.MenuName, |
| | | children: [] |
| | | } |
| | | |
| | | if (snd.trd_menu) { |
| | | sndItem.children = snd.trd_menu.map(trd => { |
| | | let trdItem = { |
| | | FstId: fst.MenuID, |
| | | ParentId: snd.MenuID, |
| | | MenuID: trd.MenuID, |
| | | MenuName: trd.MenuName, |
| | | MenuNo: trd.MenuNo, |
| | | EasyCode: trd.EasyCode, |
| | | value: trd.MenuID, |
| | | label: trd.MenuName, |
| | | disabled: false |
| | | } |
| | | |
| | | return trdItem |
| | | }) |
| | | } |
| | | return sndItem |
| | | }) |
| | | } |
| | | return fstItem |
| | | }) |
| | | |
| | | sessionStorage.setItem('fstMenuList', JSON.stringify(menulist)) |
| | | } else { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: result.message, |
| | | duration: 5 |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // 一二级菜单切换 |
| | | selectChange = (key, value) => { |
| | | const { config } = this.props |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { Form, Row, Col, InputNumber, Select, Radio } from 'antd' |
| | | import { Form, Row, Col, InputNumber, Select, Radio, Tooltip, Icon } from 'antd' |
| | | |
| | | import './index.scss' |
| | | |
| | |
| | | this.props.updateConfig({...this.props.config, everyPCount: val}) |
| | | } |
| | | |
| | | changePrintWidth = (val) => { |
| | | if (typeof(val) !== 'number') { |
| | | val = '' |
| | | } |
| | | this.props.updateConfig({...this.props.config, printWidth: val}) |
| | | } |
| | | |
| | | changePrintHeight = (val) => { |
| | | if (typeof(val) !== 'number') { |
| | | val = '' |
| | | } |
| | | this.props.updateConfig({...this.props.config, printHeight: val}) |
| | | } |
| | | |
| | | changeLastCount = (val) => { |
| | | if (typeof(val) !== 'number') { |
| | | val = '' |
| | |
| | | |
| | | pageSizeChange = (val) => { |
| | | this.props.updateConfig({...this.props.config, pageSize: val}) |
| | | this.resetPage() |
| | | } |
| | | |
| | | onLayoutChange = (val) => { |
| | | this.props.updateConfig({...this.props.config, pageLayout: val}) |
| | | this.resetPage() |
| | | } |
| | | |
| | | onPaddingChange = (val) => { |
| | | this.props.updateConfig({...this.props.config, pagePadding: val}) |
| | | this.resetPage() |
| | | } |
| | | |
| | | onPrintCustomChange = (val) => { |
| | | this.props.updateConfig({...this.props.config, printCustom: val}) |
| | | this.resetPage() |
| | | } |
| | | |
| | | resetPage = () => { |
| | | this.setState({}, () => { |
| | | const { config } = this.props |
| | | |
| | | if (config.printCustom !== 'true') return |
| | | |
| | | let pageSize = config.pageSize || 'A4' |
| | | let pageLayout = config.pageLayout !== 'horizontal' ? 'vertical' : 'horizontal' |
| | | let pagePadding = config.pagePadding !== 'without' ? 'default' : 'without' |
| | | |
| | | let pageParam = { |
| | | A4: { |
| | | vertical: 980, |
| | | horizontal: 1200, |
| | | verticaldefault: 1.455, |
| | | verticalwithout: 1.411, |
| | | horizontaldefault: 0.679, |
| | | horizontalwithout: 0.701, |
| | | }, |
| | | A3: { |
| | | vertical: 1200, |
| | | horizontal: 1600, |
| | | verticaldefault: 1.441, |
| | | verticalwithout: 1.410, |
| | | horizontaldefault: 0.688, |
| | | horizontalwithout: 0.703, |
| | | }, |
| | | A5: { |
| | | vertical: 700, |
| | | horizontal: 1000, |
| | | verticaldefault: 1.478, |
| | | verticalwithout: 1.413, |
| | | horizontaldefault: 0.669, |
| | | horizontalwithout: 0.700, |
| | | } |
| | | } |
| | | |
| | | let width = pageParam[pageSize][pageLayout] |
| | | let height = Math.floor(width * pageParam[pageSize][pageLayout + pagePadding]) |
| | | |
| | | this.props.updateConfig({...config, printHeight: height, printWidth: width}) |
| | | this.props.form.setFieldsValue({printHeight: height, printWidth: width}) |
| | | }) |
| | | } |
| | | |
| | | render() { |
| | |
| | | })(<InputNumber min={1} max={1000} precision={0} onChange={this.changeLastCount}/>)} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={24}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title="针对不规则纸张,可自定义设置打印高度和宽度,注:同时设置打印宽度和高度后方可生效。"> |
| | | <Icon type="question-circle" /> |
| | | 自定义 |
| | | </Tooltip> |
| | | }> |
| | | {getFieldDecorator('printCustom', { |
| | | initialValue: config.printCustom || 'false' |
| | | })( |
| | | <Radio.Group onChange={(e) => {this.onPrintCustomChange(e.target.value)}}> |
| | | <Radio value="false">不启用</Radio> |
| | | <Radio value="true">启用</Radio> |
| | | </Radio.Group> |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | {config.printCustom === 'true' ? <Col span={24}> |
| | | <Form.Item label="打印宽度"> |
| | | {getFieldDecorator('printWidth', { |
| | | initialValue: config.printWidth || '' |
| | | })(<InputNumber min={10} max={9999} precision={0} onChange={this.changePrintWidth}/>)} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {config.printCustom === 'true' ? <Col span={24}> |
| | | <Form.Item label="打印高度"> |
| | | {getFieldDecorator('printHeight', { |
| | | initialValue: config.printHeight || '' |
| | | })(<InputNumber min={10} max={9999} precision={0} onChange={this.changePrintHeight}/>)} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | </Row> |
| | | </Form> |
| | | ) |
| | |
| | | .ant-input-number { |
| | | width: 100%; |
| | | } |
| | | .anticon-question-circle { |
| | | color: #c49f47; |
| | | position: relative; |
| | | left: -3px; |
| | | } |
| | | } |