From b223552a0c4bc787ad251add025a93d77527ffbe Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期六, 18 十二月 2021 23:36:28 +0800 Subject: [PATCH] 2021-12-18 --- src/utils/utils-datamanage.js | 23 src/mob/searchconfig/index.jsx | 2 package-lock.json | 593 +++++++++++++------------ src/menu/components/card/table-card/index.jsx | 19 src/mob/components/tabs/antv-tabs/index.jsx | 8 src/mob/components/tabs/antv-tabs/options.jsx | 26 src/menu/components/share/actioncomponent/dragaction/card.jsx | 18 src/menu/components/card/cardcellcomponent/elementform/index.jsx | 12 src/mob/modulesource/option.jsx | 4 src/menu/components/share/actioncomponent/dragaction/index.jsx | 3 src/mob/components/topbar/normal-navbar/options.jsx | 30 src/templates/zshare/editcomponent/index.jsx | 6 src/menu/components/share/mobPagination/index.jsx | 30 src/templates/modalconfig/index.jsx | 15 src/mob/modalconfig/index.jsx | 14 src/mob/mobshell/card.jsx | 6 src/mob/components/search/single-search/index.jsx | 159 ++++++ src/tabviews/custom/components/card/cardcellList/index.jsx | 13 src/mob/components/search/single-search/options.jsx | 88 +++ src/menu/components/share/actioncomponent/index.scss | 19 src/menu/components/share/actioncomponent/formconfig.jsx | 27 + src/mob/components/search/single-search/index.scss | 26 + src/mob/searchconfig/searchdragelement/card.jsx | 5 src/pc/createview/index.jsx | 6 src/menu/components/card/data-card/index.jsx | 26 + src/menu/components/share/actioncomponent/index.jsx | 5 src/menu/components/share/mobPagination/index.scss | 39 + src/menu/components/card/cardcellcomponent/formconfig.jsx | 40 src/mob/searchconfig/settingform/index.jsx | 2 src/menu/components/share/actioncomponent/actionform/index.jsx | 46 + src/mob/components/topbar/normal-navbar/index.jsx | 12 package.json | 2 32 files changed, 913 insertions(+), 411 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1c2efcb..8a03d23 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,6 +4,15 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "@ahooksjs/use-request": { + "version": "2.8.15", + "resolved": "https://registry.npmjs.org/@ahooksjs/use-request/-/use-request-2.8.15.tgz", + "integrity": "sha512-xhVaM4fyIiAMdVFuuU5i3CFUdFa/IblF+fvITVMFaUEO3w/V5tVCAF6WIA3T03n1/RPuzRkA7Ao1PFtSGtGelw==", + "requires": { + "lodash.debounce": "^4.0.8", + "lodash.throttle": "^4.1.1" + } + }, "@ant-design/colors": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/@ant-design/colors/-/colors-3.2.2.tgz", @@ -2284,6 +2293,55 @@ "resolved": "https://registry.npmjs.org/@react-native-community/cli-types/-/cli-types-4.10.1.tgz", "integrity": "sha512-ael2f1onoPF3vF7YqHGWy7NnafzGu+yp88BbFbP0ydoCP2xGSUzmZVw0zakPTC040Id+JQ9WeFczujMkDy6jYQ==" }, + "@react-spring/animated": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/@react-spring/animated/-/animated-9.3.1.tgz", + "integrity": "sha512-23YaERZ++BwZ8F8PxPFqrpOwp/JZun1Pj6aHZtPAU42j5LycBRasT9XMw7Eyr7zNFhT+rl3R3wFfd4WX6Ax+UA==", + "requires": { + "@react-spring/shared": "~9.3.0", + "@react-spring/types": "~9.3.0" + } + }, + "@react-spring/core": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/@react-spring/core/-/core-9.3.1.tgz", + "integrity": "sha512-8rmfmEHLHGtF1CUiXRn64YJqsXNxv2cGX8oNnBnsuoE33c48Zc34t2VIMB4R9q5zwIUCvDBGfiEenA8ZAPxqOQ==", + "requires": { + "@react-spring/animated": "~9.3.0", + "@react-spring/shared": "~9.3.0", + "@react-spring/types": "~9.3.0" + } + }, + "@react-spring/rafz": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/@react-spring/rafz/-/rafz-9.3.1.tgz", + "integrity": "sha512-fEBMCarGVl+/2kdO+g6Zig4F+3ymwmcGN8S71gb1c7Cbbxb87kviPz8EhshfIHoiLeJPGlqwcuGbxNmZbBamvA==" + }, + "@react-spring/shared": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/@react-spring/shared/-/shared-9.3.1.tgz", + "integrity": "sha512-jhPpxzURGo6Nty90ex1lkxmZae7w/VAbnGmb/nXcYoZwSoNR+W2aAd00iXsh2ZGz6MgoJOsc495JeG3uC7Am8A==", + "requires": { + "@react-spring/rafz": "~9.3.0", + "@react-spring/types": "~9.3.0" + } + }, + "@react-spring/types": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/@react-spring/types/-/types-9.3.1.tgz", + "integrity": "sha512-W/YMJMX35XgGGzX0gKORBTwnvQ+1loDOFN3XlZkW5fgpEY+7VkRUpPyqPWXQr3n6lHrsLmHIGdpznqZi54ACTQ==" + }, + "@react-spring/web": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/@react-spring/web/-/web-9.3.1.tgz", + "integrity": "sha512-sisZIgFGva/Z+xKWPSfXpukF0AP3kR9ALTxlHL87fVotMUCJX5vtH/YlVcywToEFwTHKt3MpI5Wy2M+vgVEeaw==", + "requires": { + "@react-spring/animated": "~9.3.0", + "@react-spring/core": "~9.3.0", + "@react-spring/shared": "~9.3.0", + "@react-spring/types": "~9.3.0" + } + }, "@svgr/babel-plugin-add-jsx-attribute": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-4.2.0.tgz", @@ -2582,6 +2640,11 @@ "@types/istanbul-lib-report": "*" } }, + "@types/js-cookie": { + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/@types/js-cookie/-/js-cookie-2.2.7.tgz", + "integrity": "sha512-aLkWa0C0vO5b4Sr798E26QgOkss68Un0bLjs7u9qxzPT5CG+8DuNTffWES58YzJs3hrVAOs1wonycqEBqNJubA==" + }, "@types/json-schema": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.3.tgz", @@ -2634,6 +2697,11 @@ "requires": { "reselect": "*" } + }, + "@types/resize-observer-browser": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/@types/resize-observer-browser/-/resize-observer-browser-0.1.6.tgz", + "integrity": "sha512-61IfTac0s9jvNtBCpyo86QeaN8qqpMGHdK0uGKCCIy2dt5/Yk84VduHIdWAcmkC5QvdkPL0p5eWYgUZtHKKUVg==" }, "@types/shallowequal": { "version": "1.1.1", @@ -2714,6 +2782,19 @@ "requires": { "codemirror": "^5.50.2", "prop-types": "^15.7.2" + } + }, + "@use-gesture/core": { + "version": "10.2.4", + "resolved": "https://registry.npmjs.org/@use-gesture/core/-/core-10.2.4.tgz", + "integrity": "sha512-fk1LjCBj43BKb8NE05qkdtPOR0ngA7PwgvEqfFap/h+s7QHi+JTv4/mtDQ4wI9zzem+Ry5EKrHS/cVdBehI4wA==" + }, + "@use-gesture/react": { + "version": "10.2.4", + "resolved": "https://registry.npmjs.org/@use-gesture/react/-/react-10.2.4.tgz", + "integrity": "sha512-CbqyRj+qNbRBOGmS8OWtaOa29fxEr7bKTYHvPuMQ1wsgQDh2/DqQxbp7cFxAg6WZ8oZjppDj/EkWnw22WpIIWQ==", + "requires": { + "@use-gesture/core": "10.2.4" } }, "@webassemblyjs/ast": { @@ -3003,6 +3084,30 @@ "resolved": "https://registry.npmjs.org/agentframework/-/agentframework-0.9.22.tgz", "integrity": "sha512-LKQwcxVWbfJj+gtdHYeq+nqUIg3+NkYS7LCMZ3hMk1eZkFjJqG5RiPsXiYZV5vOQESUZwoY0e9k9Kz/GfhoVEw==" }, + "ahooks": { + "version": "2.10.14", + "resolved": "https://registry.npmjs.org/ahooks/-/ahooks-2.10.14.tgz", + "integrity": "sha512-axWa7VoAgu7bxA56dDl0CXW4rvaQmDBiov/d3tAy0x1YNYywYMKokL8TdLgJ5zO/oXGiWmG7BxlGOQGkqE/zkQ==", + "requires": { + "@ahooksjs/use-request": "^2.8.14", + "@types/js-cookie": "^2.2.6", + "dayjs": "^1.9.1", + "intersection-observer": "^0.7.0", + "js-cookie": "^2.2.1", + "lodash.debounce": "^4.0.8", + "lodash.isequal": "^4.5.0", + "lodash.throttle": "^4.1.1", + "resize-observer-polyfill": "^1.5.1", + "screenfull": "^5.0.0" + }, + "dependencies": { + "dayjs": { + "version": "1.10.7", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.10.7.tgz", + "integrity": "sha512-P6twpd70BcPK34K26uJ1KT3wlhpuOAPoMwJzpsIWUxHZ7wpmbdZL/hQqBDfz7hGurYSa5PhzdhDHtt319hL3ig==" + } + } + }, "ajv": { "version": "6.10.2", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz", @@ -3221,80 +3326,113 @@ } }, "antd-mobile": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/antd-mobile/-/antd-mobile-2.3.3.tgz", - "integrity": "sha512-ZBnkWV+9F+CQA1pvt7zzFVTF1SlNQwJCJCnWafVvG5q8OCkOxm9uVHgsNI+v9yDpo03FABZk0Tgq6U8NaybLWw==", + "version": "5.0.0-rc.6", + "resolved": "https://registry.npmjs.org/antd-mobile/-/antd-mobile-5.0.0-rc.6.tgz", + "integrity": "sha512-D4y/Ofo8nyG1OZwpEbwPH9k4cY5DdBXhZIxZafQ58VGC8ZY792qS1ykml75KfY/57YXn0sBgdbFkoet4TiLPZg==", "requires": { - "array-tree-filter": "~2.1.0", - "babel-runtime": "6.x", - "classnames": "^2.2.1", - "normalize.css": "^7.0.0", - "rc-checkbox": "~2.0.0", - "rc-collapse": "~1.9.1", - "rc-slider": "~8.2.0", - "rc-swipeout": "~2.0.0", - "rmc-calendar": "^1.0.0", - "rmc-cascader": "~5.0.0", - "rmc-date-picker": "^6.0.8", - "rmc-dialog": "^1.0.1", - "rmc-drawer": "^0.4.11", - "rmc-feedback": "^2.0.0", - "rmc-input-number": "^1.0.0", - "rmc-list-view": "^0.11.0", - "rmc-notification": "~1.0.0", - "rmc-nuka-carousel": "~3.0.0", - "rmc-picker": "~5.0.0", - "rmc-pull-to-refresh": "~1.0.1", - "rmc-steps": "~1.0.0", - "rmc-tabs": "~1.2.0", - "rmc-tooltip": "~1.0.0" + "@react-spring/web": "^9.3.1", + "@types/resize-observer-browser": "^0.1.6", + "@use-gesture/react": "^10.2.4", + "ahooks": "^2.10.14", + "antd-mobile-icons": "^0.2.2", + "antd-mobile-v5-count": "^1.0.1", + "classnames": "^2.3.1", + "dayjs": "^1.10.7", + "lodash": "^4.17.21", + "rc-field-form": "^1.22.0", + "rc-tooltip": "^5.1.1", + "staged-components": "^1.1.2", + "use-async-memo": "^1.2.3" }, "dependencies": { - "rc-checkbox": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/rc-checkbox/-/rc-checkbox-2.0.3.tgz", - "integrity": "sha1-Q2qdUIlI4iSYDwU16nOLSBd6jyU=", + "@babel/runtime": { + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.5.tgz", + "integrity": "sha512-TXWihFIS3Pyv5hzR7j6ihmeLkZfrXGxAr5UfSl8CHf+6q/wpiYDkUau0czckpYG8QmnCIuPpdLtuA9VmuGGyMA==", "requires": { - "babel-runtime": "^6.23.0", + "regenerator-runtime": "^0.13.4" + } + }, + "classnames": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.1.tgz", + "integrity": "sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA==" + }, + "dayjs": { + "version": "1.10.7", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.10.7.tgz", + "integrity": "sha512-P6twpd70BcPK34K26uJ1KT3wlhpuOAPoMwJzpsIWUxHZ7wpmbdZL/hQqBDfz7hGurYSa5PhzdhDHtt319hL3ig==" + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "rc-align": { + "version": "4.0.11", + "resolved": "https://registry.npmjs.org/rc-align/-/rc-align-4.0.11.tgz", + "integrity": "sha512-n9mQfIYQbbNTbefyQnRHZPWuTEwG1rY4a9yKlIWHSTbgwI+XUMGRYd0uJ5pE2UbrNX0WvnMBA1zJ3Lrecpra/A==", + "requires": { + "@babel/runtime": "^7.10.1", "classnames": "2.x", - "prop-types": "15.x", - "rc-util": "^4.0.4" + "dom-align": "^1.7.0", + "lodash": "^4.17.21", + "rc-util": "^5.3.0", + "resize-observer-polyfill": "^1.5.1" } }, - "rc-collapse": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/rc-collapse/-/rc-collapse-1.9.3.tgz", - "integrity": "sha512-8cG+FzudmgFCC9zRGKXJZA36zoI9Dmyjp6UDi8N80sXUch0JOpsZDxgcFzw4HPpPpK/dARtTilEe9zyuspnW0w==", + "rc-tooltip": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/rc-tooltip/-/rc-tooltip-5.1.1.tgz", + "integrity": "sha512-alt8eGMJulio6+4/uDm7nvV+rJq9bsfxFDCI0ljPdbuoygUscbsMYb6EQgwib/uqsXQUvzk+S7A59uYHmEgmDA==", "requires": { - "classnames": "2.x", - "css-animation": "1.x", - "prop-types": "^15.5.6", - "rc-animate": "2.x" + "@babel/runtime": "^7.11.2", + "rc-trigger": "^5.0.0" } }, - "rc-slider": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/rc-slider/-/rc-slider-8.2.0.tgz", - "integrity": "sha1-rjfRcUTK1g4dpurA7k/8/qCwpug=", + "rc-trigger": { + "version": "5.2.10", + "resolved": "https://registry.npmjs.org/rc-trigger/-/rc-trigger-5.2.10.tgz", + "integrity": "sha512-FkUf4H9BOFDaIwu42fvRycXMAvkttph9AlbCZXssZDVzz2L+QZ0ERvfB/4nX3ZFPh1Zd+uVGr1DEDeXxq4J1TA==", "requires": { - "babel-runtime": "6.x", - "classnames": "^2.2.5", - "prop-types": "^15.5.4", - "rc-tooltip": "^3.4.2", - "rc-util": "^4.0.4", - "shallowequal": "^1.0.1", - "warning": "^3.0.0" + "@babel/runtime": "^7.11.2", + "classnames": "^2.2.6", + "rc-align": "^4.0.0", + "rc-motion": "^2.0.0", + "rc-util": "^5.5.0" } }, - "warning": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/warning/-/warning-3.0.0.tgz", - "integrity": "sha1-MuU3fLVy3kqwR1O9+IIcAe1gW3w=", + "rc-util": { + "version": "5.16.1", + "resolved": "https://registry.npmjs.org/rc-util/-/rc-util-5.16.1.tgz", + "integrity": "sha512-kSCyytvdb3aRxQacS/71ta6c+kBWvM1v8/2h9d/HaNWauc3qB8pLnF20PJ8NajkNN8gb+rR1l0eWO+D4Pz+LLQ==", "requires": { - "loose-envify": "^1.0.0" + "@babel/runtime": "^7.12.5", + "react-is": "^16.12.0", + "shallowequal": "^1.1.0" } + }, + "react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + }, + "regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==" } } + }, + "antd-mobile-icons": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/antd-mobile-icons/-/antd-mobile-icons-0.2.2.tgz", + "integrity": "sha512-iquIc7EsQTndk5nMv9pQQv+/OY5YnjVIPhtCFo7W7JL+Gjqzq/YJ/HO2WxUxyCgYha2NsTTNAb2vPa/M4zAi2g==" + }, + "antd-mobile-v5-count": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/antd-mobile-v5-count/-/antd-mobile-v5-count-1.0.1.tgz", + "integrity": "sha512-YGsiEDCPUDz3SzfXi6gLZn/HpeSMW+jgPc4qiYUr1fSopg3hkUie2TnooJdExgfiETHefH3Ggs58He0OVfegLA==" }, "anymatch": { "version": "2.0.0", @@ -8420,11 +8558,6 @@ } } }, - "exenv": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/exenv/-/exenv-1.2.2.tgz", - "integrity": "sha1-KueOhdmJQVhnCwPUe+wfA72Ru50=" - }, "exit": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", @@ -10555,6 +10688,11 @@ "ipaddr.js": "^1.9.0" } }, + "intersection-observer": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/intersection-observer/-/intersection-observer-0.7.0.tgz", + "integrity": "sha512-Id0Fij0HsB/vKWGeBe9PxeY45ttRiBmhFyyt/geBdDHBYNctMRTE3dC1U3ujzz3lap+hVXlEcVaB56kZP/eEUg==" + }, "invariant": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", @@ -11850,6 +11988,11 @@ "version": "2.5.1", "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.5.1.tgz", "integrity": "sha512-M7kLczedRMYX4L8Mdh4MzyAMM9O5osx+4FcOQuTvr3A9F2D9S5JXheN0ewNbrvK2UatkTRhL5ejGmGSjNMiZuw==" + }, + "js-cookie": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-2.2.1.tgz", + "integrity": "sha512-HvdH2LzI/EAZcUwA8+0nKNtWHqS+ZmijLA30RwZA0bo7ToCckjK5MkGhjED9KoRcXO6BaGI3I9UIzSA1FKFPOQ==" }, "js-levenshtein": { "version": "1.1.6", @@ -14096,11 +14239,6 @@ "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-3.3.0.tgz", "integrity": "sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg==" }, - "normalize.css": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/normalize.css/-/normalize.css-7.0.0.tgz", - "integrity": "sha1-q/sd2CRwZ04DIrU86xqvQSk45L8=" - }, "npm-run-path": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", @@ -16314,6 +16452,51 @@ } } }, + "rc-field-form": { + "version": "1.22.0", + "resolved": "https://registry.npmjs.org/rc-field-form/-/rc-field-form-1.22.0.tgz", + "integrity": "sha512-IQBNeF4i64lBNLz8HbfXqUpAnrpBtfu2xU6q/wXMfdQm1AfKjiHyMNOxmiA5ZKMOOQPi+YOSzDbictfQP94hUA==", + "requires": { + "@babel/runtime": "^7.8.4", + "async-validator": "^4.0.2", + "rc-util": "^5.8.0" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.5.tgz", + "integrity": "sha512-TXWihFIS3Pyv5hzR7j6ihmeLkZfrXGxAr5UfSl8CHf+6q/wpiYDkUau0czckpYG8QmnCIuPpdLtuA9VmuGGyMA==", + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "async-validator": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/async-validator/-/async-validator-4.0.7.tgz", + "integrity": "sha512-Pj2IR7u8hmUEDOwB++su6baaRi+QvsgajuFB9j95foM1N2gy5HM4z60hfusIO0fBPG5uLAEl6yCJr1jNSVugEQ==" + }, + "rc-util": { + "version": "5.16.1", + "resolved": "https://registry.npmjs.org/rc-util/-/rc-util-5.16.1.tgz", + "integrity": "sha512-kSCyytvdb3aRxQacS/71ta6c+kBWvM1v8/2h9d/HaNWauc3qB8pLnF20PJ8NajkNN8gb+rR1l0eWO+D4Pz+LLQ==", + "requires": { + "@babel/runtime": "^7.12.5", + "react-is": "^16.12.0", + "shallowequal": "^1.1.0" + } + }, + "react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + }, + "regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==" + } + } + }, "rc-form": { "version": "2.4.11", "resolved": "https://registry.npmjs.org/rc-form/-/rc-form-2.4.11.tgz", @@ -16346,14 +16529,6 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" } - } - }, - "rc-gesture": { - "version": "0.0.22", - "resolved": "https://registry.npmjs.org/rc-gesture/-/rc-gesture-0.0.22.tgz", - "integrity": "sha512-6G6qrCE0MUTXyjh/powj91XkjRjoFL4HiJLPU5lALXHvGX+/efcUjGYUrHrrw0mwQdmrmg4POqnY/bibns+G3g==", - "requires": { - "babel-runtime": "6.x" } }, "rc-hammerjs": { @@ -16437,6 +16612,46 @@ "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + } + } + }, + "rc-motion": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/rc-motion/-/rc-motion-2.4.4.tgz", + "integrity": "sha512-ms7n1+/TZQBS0Ydd2Q5P4+wJTSOrhIrwNxLXCZpR7Fa3/oac7Yi803HDALc2hLAKaCTQtw9LmQeB58zcwOsqlQ==", + "requires": { + "@babel/runtime": "^7.11.1", + "classnames": "^2.2.1", + "rc-util": "^5.2.1" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.5.tgz", + "integrity": "sha512-TXWihFIS3Pyv5hzR7j6ihmeLkZfrXGxAr5UfSl8CHf+6q/wpiYDkUau0czckpYG8QmnCIuPpdLtuA9VmuGGyMA==", + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "rc-util": { + "version": "5.16.1", + "resolved": "https://registry.npmjs.org/rc-util/-/rc-util-5.16.1.tgz", + "integrity": "sha512-kSCyytvdb3aRxQacS/71ta6c+kBWvM1v8/2h9d/HaNWauc3qB8pLnF20PJ8NajkNN8gb+rR1l0eWO+D4Pz+LLQ==", + "requires": { + "@babel/runtime": "^7.12.5", + "react-is": "^16.12.0", + "shallowequal": "^1.1.0" + } + }, + "react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + }, + "regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==" } } }, @@ -16555,17 +16770,6 @@ "classnames": "^2.2.3", "lodash": "^4.17.5", "prop-types": "^15.5.7" - } - }, - "rc-swipeout": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/rc-swipeout/-/rc-swipeout-2.0.11.tgz", - "integrity": "sha512-d37Lgn4RX4OOQyuA2BFo0rGlUwrmZk5q83srH3ixJ1Y1jidr2GKjgJDbNeGUVZPNfYBL91Elu6+xfVGftWf4Lg==", - "requires": { - "babel-runtime": "6.x", - "classnames": "2.x", - "rc-gesture": "~0.0.22", - "react-native-swipeout": "^2.2.2" } }, "rc-switch": { @@ -17456,16 +17660,6 @@ } } }, - "react-native-swipeout": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/react-native-swipeout/-/react-native-swipeout-2.3.6.tgz", - "integrity": "sha512-t9suUCspzck4vp2pWggWe0frS/QOtX6yYCawHnEes75A7dZCEE74bxX2A1bQzGH9cUMjq6xsdfC94RbiDKIkJg==", - "requires": { - "create-react-class": "^15.6.0", - "prop-types": "^15.5.10", - "react-tween-state": "^0.1.5" - } - }, "react-redux": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-7.1.1.tgz", @@ -17535,15 +17729,6 @@ "json2mq": "^0.2.0", "lodash.debounce": "^4.0.8", "resize-observer-polyfill": "^1.5.0" - } - }, - "react-tween-state": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/react-tween-state/-/react-tween-state-0.1.5.tgz", - "integrity": "sha1-6YsGZVHvuTy5LdG+FJlcLj3q4zk=", - "requires": { - "raf": "^3.1.0", - "tween-functions": "^1.0.1" } }, "reactcss": { @@ -18027,64 +18212,6 @@ "inherits": "^2.0.1" } }, - "rmc-align": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/rmc-align/-/rmc-align-1.0.0.tgz", - "integrity": "sha512-3gEa5/+hqqoEVoeQ25KoRc8DOsXIdSaVpaBq1zQFaV941LR3xvZIRTlxTDT/IagYwoGM1KZea/jd7cNMYP34Rg==", - "requires": { - "babel-runtime": "6.x", - "dom-align": "1.x", - "rc-util": "4.x" - } - }, - "rmc-calendar": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/rmc-calendar/-/rmc-calendar-1.1.4.tgz", - "integrity": "sha512-xxQZaPFDnpHt4IFO8mukYrXSgC1W8LcNVp+EoX4iyeOJFimungOKB/iP5/cy+st8yXq8lUgk9TXsHNtM6Xo6ZA==", - "requires": { - "babel-runtime": "^6.26.0", - "rc-animate": "^2.4.4", - "rmc-date-picker": "^6.0.8" - } - }, - "rmc-cascader": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/rmc-cascader/-/rmc-cascader-5.0.3.tgz", - "integrity": "sha512-PxDhMjWViDdG4SMZqoXtAthGwgDyYnyxxZEE17IDDYsiCHpWtOhoIL8nsI+/hZ212UT/XF2LpqCsOlMoJiYk+w==", - "requires": { - "array-tree-filter": "2.1.x", - "babel-runtime": "6.x", - "rmc-picker": "~5.0.0" - } - }, - "rmc-date-picker": { - "version": "6.0.10", - "resolved": "https://registry.npmjs.org/rmc-date-picker/-/rmc-date-picker-6.0.10.tgz", - "integrity": "sha512-/9+I6lm3EDEl6M7862V6++zFuxwsM0UEq8wSHbotYIPPmyB/65gx1cviblghOv2QfB0O9+U2w3qEJlRP/WsMrA==", - "requires": { - "babel-runtime": "6.x", - "rmc-picker": "~5.0.0" - } - }, - "rmc-dialog": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/rmc-dialog/-/rmc-dialog-1.1.1.tgz", - "integrity": "sha512-28aJqtPTX6v13Z/aU1WBy1AFIXkE74PxZXde7JvtEIy9hQDTjH8fqOi822BpzAbXCyNE7jF9iFomy3H2ClsDJA==", - "requires": { - "babel-runtime": "6.x", - "rc-animate": "2.x" - } - }, - "rmc-drawer": { - "version": "0.4.11", - "resolved": "https://registry.npmjs.org/rmc-drawer/-/rmc-drawer-0.4.11.tgz", - "integrity": "sha512-YfB9XEJ8iM0MMuLWAK4313uOxSM8NAljC8Cqun1KamXutglYTuRviUuTLNSOzV8HHPp5kNpsVduvPCGLWXvThw==", - "requires": { - "babel-runtime": "6.x", - "classnames": "^2.2.4", - "prop-types": "^15.5.10" - } - }, "rmc-feedback": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/rmc-feedback/-/rmc-feedback-2.0.0.tgz", @@ -18092,118 +18219,6 @@ "requires": { "babel-runtime": "6.x", "classnames": "^2.2.5" - } - }, - "rmc-input-number": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/rmc-input-number/-/rmc-input-number-1.0.5.tgz", - "integrity": "sha512-prPkEtoOVde77GnEnEaBeWjBobMOPgGqU5bd0gxfp1kt1pUN740mMpVAcH7uxpJjVfmw+kuGWtiz4S7CueagSg==", - "requires": { - "babel-runtime": "6.x", - "classnames": "^2.2.0", - "rmc-feedback": "^2.0.0" - } - }, - "rmc-list-view": { - "version": "0.11.5", - "resolved": "https://registry.npmjs.org/rmc-list-view/-/rmc-list-view-0.11.5.tgz", - "integrity": "sha512-eMOC5394tLNawcdEEhF7boMpQgpjJGDdL5lS+LblAWdBec7Q4EYkUdnrKNbt+O9k5RGM6nSLAGZK5oB4FN85Lg==", - "requires": { - "babel-runtime": "6.x", - "classnames": "^2.2.5", - "fbjs": "^0.8.3", - "prop-types": "^15.5.8", - "warning": "^3.0.0", - "zscroller": "~0.4.0" - }, - "dependencies": { - "warning": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/warning/-/warning-3.0.0.tgz", - "integrity": "sha1-MuU3fLVy3kqwR1O9+IIcAe1gW3w=", - "requires": { - "loose-envify": "^1.0.0" - } - } - } - }, - "rmc-notification": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/rmc-notification/-/rmc-notification-1.0.0.tgz", - "integrity": "sha512-9sPxjltFvtRLt2v312Hu7OXwk53pHkBYgINRDmnJ3A5NF1qtJeCCcdN0Xr0fzJ6sbQvtGju822tWHdzYA9u7Vw==", - "requires": { - "babel-runtime": "6.x", - "classnames": "2.x", - "prop-types": "^15.5.8", - "rc-animate": "2.x", - "rc-util": "^4.0.4" - } - }, - "rmc-nuka-carousel": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/rmc-nuka-carousel/-/rmc-nuka-carousel-3.0.1.tgz", - "integrity": "sha512-w2EPTERMUUZqcUSKFuejjin7xsMlhrLrtS0A/igTXpFJGq3kemDKcRi7q3pSYDuZBHYBl5iV4UqsLLkjdFtrYA==", - "requires": { - "exenv": "^1.2.0", - "raf": "^3.3.2" - } - }, - "rmc-picker": { - "version": "5.0.10", - "resolved": "https://registry.npmjs.org/rmc-picker/-/rmc-picker-5.0.10.tgz", - "integrity": "sha512-KZ70+WjcaZHnG5GyCxWCPFWAZ12s6NqyrbW73LeqH0WEqaTMMs0sOrk2f4mQAZ/CGT0XcFN6VZLw7Ozoxfn7LA==", - "requires": { - "babel-runtime": "6.x", - "classnames": "^2.2.6", - "rmc-dialog": "^1.1.1", - "rmc-feedback": "^2.0.0" - } - }, - "rmc-pull-to-refresh": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/rmc-pull-to-refresh/-/rmc-pull-to-refresh-1.0.12.tgz", - "integrity": "sha512-OQPRY5RzhRNi0amyvwIrENqQHQRJh7bF8Hdcn/wqTSKsC5Cn1pGJ4bNG1+iL9w1N+PoKt+ESvL2ap8fVqwuH1w==", - "requires": { - "babel-runtime": "6.x", - "classnames": "^2.2.5" - } - }, - "rmc-steps": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/rmc-steps/-/rmc-steps-1.0.0.tgz", - "integrity": "sha512-VuQEPC2P4PQ7DdZDCIbGfFTfzzTwLAyey+fSJUolc4qheIE7bN4oogH2xDZurM2TTpAQHg2aMMv4E6JYyVbUqA==", - "requires": { - "babel-runtime": "^6.23.0", - "classnames": "^2.2.3" - } - }, - "rmc-tabs": { - "version": "1.2.29", - "resolved": "https://registry.npmjs.org/rmc-tabs/-/rmc-tabs-1.2.29.tgz", - "integrity": "sha512-wiJS9WSJi9JH9GQO+FqncX+zaHP31qHa/S8nDW9UXUx0qbCX294QcJEnvfB+WmsfUws7rXjs6sOQp5EDiObnHg==", - "requires": { - "babel-runtime": "6.x", - "rc-gesture": "~0.0.18" - } - }, - "rmc-tooltip": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/rmc-tooltip/-/rmc-tooltip-1.0.1.tgz", - "integrity": "sha512-fSDArf2BlMVrHExmBiqb2TkCRJHshvXFJQ/7tMraLellwaJLNiwrxtWpW329k3S+zTtoVG8UxFS1TjBGEsMzRg==", - "requires": { - "babel-runtime": "6.x", - "rmc-trigger": "1.x" - } - }, - "rmc-trigger": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/rmc-trigger/-/rmc-trigger-1.0.12.tgz", - "integrity": "sha512-AccQniX7PX7Pm8hBhHEsnf3JU6CA61Xc7fAt2WbO+oXrGaI/jqN8C3COhhOXG54S5iTOjLS26j858zshwAxR9A==", - "requires": { - "babel-runtime": "6.x", - "rc-animate": "2.x", - "rc-util": "4.x", - "rmc-align": "~1.0.0" } }, "rsvp": { @@ -18376,6 +18391,11 @@ "ajv-errors": "^1.0.0", "ajv-keywords": "^3.1.0" } + }, + "screenfull": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/screenfull/-/screenfull-5.2.0.tgz", + "integrity": "sha512-9BakfsO2aUQN2K9Fdbj87RJIEZ82Q9IGim7FqM5OsebfoFC6ZHXgDq/KvniuLTPdeM8wY2o6Dj3WQ7KeQCj3cA==" }, "scss-tokenizer": { "version": "0.2.3", @@ -19221,6 +19241,11 @@ "type-fest": "^0.7.1" } }, + "staged-components": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/staged-components/-/staged-components-1.1.2.tgz", + "integrity": "sha512-Fzf0qhYau/zn1pEsZSZml0b8vvGvdC+xo71jM0TE8vtM/2VjRCGLWaPb3vH3csaLv4qcoXVMMcRIeSO+HTHehQ==" + }, "static-extend": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", @@ -19935,11 +19960,6 @@ "safe-buffer": "^5.0.1" } }, - "tween-functions": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/tween-functions/-/tween-functions-1.2.0.tgz", - "integrity": "sha1-GuOlDnxguz3vd06scHrLynO7w/8=" - }, "tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", @@ -20452,6 +20472,11 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==" + }, + "use-async-memo": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/use-async-memo/-/use-async-memo-1.2.3.tgz", + "integrity": "sha512-AjZ1Wy1vfOSlaxohqoLIpauV+jwph/p0N72PBzxeEcjrZ4Mf/4o1Vav4bLaAPYuHLJZo+4M/4TIcAk7XC6H98g==" }, "use-subscription": { "version": "1.4.1", @@ -21369,14 +21394,6 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==" } - } - }, - "zscroller": { - "version": "0.4.8", - "resolved": "https://registry.npmjs.org/zscroller/-/zscroller-0.4.8.tgz", - "integrity": "sha512-G5NiNLKx2+QhhvZi2yV1jjVXY50otktxkseX2hG2N/eixohOUk0AY8ZpbAxNqS9oJS/NxItCsowupy2tsXxAMw==", - "requires": { - "babel-runtime": "6.x" } } } diff --git a/package.json b/package.json index 3cd5c8f..7ceec02 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "@typescript-eslint/parser": "1.13.0", "@uiw/react-codemirror": "^2.2.1", "antd": "^3.26.20", - "antd-mobile": "^2.3.3", + "antd-mobile": "^5.0.0-rc.6", "axios": "^0.19.0", "babel-eslint": "10.0.2", "babel-jest": "^24.8.0", diff --git a/src/menu/components/card/cardcellcomponent/elementform/index.jsx b/src/menu/components/card/cardcellcomponent/elementform/index.jsx index a188052..e6945da 100644 --- a/src/menu/components/card/cardcellcomponent/elementform/index.jsx +++ b/src/menu/components/card/cardcellcomponent/elementform/index.jsx @@ -98,7 +98,7 @@ getOptions = (eleType, datatype, link, showType, showInfo) => { let _options = fromJS(cardTypeOptions[eleType]).toJS() // 閫夐」鍒楄〃 - if (['text', 'number', 'picture', 'link', 'slider', 'barcode', 'qrcode', 'video'].includes(eleType)) { + if (['text', 'number', 'picture', 'slider', 'barcode', 'qrcode', 'video'].includes(eleType)) { if (datatype === 'dynamic') { _options.push('field') } else if (eleType === 'picture' || eleType === 'video') { @@ -108,13 +108,9 @@ } if (['text', 'picture'].includes(eleType) && link) { - if (link === 'dynamic' || link === 'static' || link === 'custom') { - _options.push('linkurl', 'joint') - } else if (link === 'page') { - _options.push('copyMenuId', 'joint', 'open') - } else if (link === 'linkpage') { - _options.push('linkmenu', 'joint', 'open') - } + // if (link === 'dynamic' || link === 'static') { + _options.push('linkurl', 'joint', 'linkType') + // } } else if (eleType === 'picture' && !link) { _options.push('scale') } else if (eleType === 'slider') { diff --git a/src/menu/components/card/cardcellcomponent/formconfig.jsx b/src/menu/components/card/cardcellcomponent/formconfig.jsx index 7c26bba..8ff1383 100644 --- a/src/menu/components/card/cardcellcomponent/formconfig.jsx +++ b/src/menu/components/card/cardcellcomponent/formconfig.jsx @@ -402,7 +402,7 @@ initVal: card.link || '', tooltip: '鍔ㄦ�佸湴鍧�涓虹粦瀹氬瓧娈靛�笺��', required: false, - forbid: isApp, + // forbid: isApp, options: [ { value: '', text: '鏃�' }, { value: 'dynamic', text: '鍔ㄦ��' }, @@ -411,15 +411,15 @@ }, { type: 'radio', - key: 'link', - label: '閾炬帴', - initVal: card.link || '', + key: 'linkType', + label: '閾炬帴绫诲瀷', + initVal: card.linkType || 'other', required: false, - forbid: !isApp, + // forbid: isApp, options: [ - { value: '', text: '鏃�' }, - { value: 'linkpage', text: '鍏宠仈鑿滃崟' }, - { value: 'custom', text: '閾炬帴' } + { value: 'tel', text: '鐢佃瘽' }, + { value: 'email', text: '閭' }, + { value: 'other', text: '鍏朵粬' } ] }, { @@ -442,18 +442,18 @@ forbid: !isApp, options: appMenus }, - { - type: 'radio', - key: 'open', - label: '鎵撳紑鏂瑰紡', - initVal: card.open || 'blank', - required: false, - forbid: !isApp, - options: [ - { value: 'blank', text: '鏂伴〉闈�' }, - { value: 'self', text: '褰撳墠椤甸潰' } - ] - }, + // { + // type: 'radio', + // key: 'open', + // label: '鎵撳紑鏂瑰紡', + // initVal: card.open || 'blank', + // required: false, + // forbid: !isApp, + // options: [ + // { value: 'blank', text: '鏂伴〉闈�' }, + // { value: 'self', text: '褰撳墠椤甸潰' } + // ] + // }, // { // type: 'select', // key: 'copyMenuId', diff --git a/src/menu/components/card/data-card/index.jsx b/src/menu/components/card/data-card/index.jsx index c864bd0..527d309 100644 --- a/src/menu/components/card/data-card/index.jsx +++ b/src/menu/components/card/data-card/index.jsx @@ -115,11 +115,31 @@ }) this.props.updateConfig(_card) } else { - card.action = card.action || [] // 鍏煎 - card.search = card.search || [] // 鍏煎 + let _card = fromJS(card).toJS() + _card.action = _card.action || [] // 鍏煎 + _card.search = _card.search || [] // 鍏煎 + + if (appType === 'mob') { + _card.action = _card.action.map(item => { + if (!item.color) { + if (item.sqlType === 'LogicDelete' || item.sqlType === 'delete') { + item.color = 'danger' + } else if (item.sqlType === 'insert') { + item.color = 'success' + } else if (item.sqlType === 'update' || item.sqlType === 'insertOrUpdate' || item.sqlType === 'custom') { + item.color = 'primary' + } else if (item.sqlType === 'audit') { + item.color = 'warning' + } else { + item.color = 'weak' + } + } + return item + }) + } this.setState({ - card: fromJS(card).toJS() + card: _card }) } } diff --git a/src/menu/components/card/table-card/index.jsx b/src/menu/components/card/table-card/index.jsx index 75c8138..12c5b76 100644 --- a/src/menu/components/card/table-card/index.jsx +++ b/src/menu/components/card/table-card/index.jsx @@ -109,6 +109,25 @@ if (!_card.action) { _card.action = [] } + + if (this.state.appType === 'mob') { + _card.action = _card.action.map(item => { + if (!item.color) { + if (item.sqlType === 'LogicDelete' || item.sqlType === 'delete') { + item.color = 'danger' + } else if (item.sqlType === 'insert') { + item.color = 'success' + } else if (item.sqlType === 'update' || item.sqlType === 'insertOrUpdate' || item.sqlType === 'custom') { + item.color = 'primary' + } else if (item.sqlType === 'audit') { + item.color = 'warning' + } else { + item.color = 'weak' + } + } + return item + }) + } this.setState({ card: _card }) diff --git a/src/menu/components/share/actioncomponent/actionform/index.jsx b/src/menu/components/share/actioncomponent/actionform/index.jsx index e703f77..0b3f850 100644 --- a/src/menu/components/share/actioncomponent/actionform/index.jsx +++ b/src/menu/components/share/actioncomponent/actionform/index.jsx @@ -11,15 +11,15 @@ const { TextArea } = Input const MkIcon = asyncComponent(() => import('@/components/mkIcon')) const actionTypeOptions = { - pop: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width', 'openmenu', 'open', 'output', 'refreshTab', 'reload'], - prompt: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width', 'openmenu', 'open', 'output', 'refreshTab', 'reload'], - exec: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width', 'openmenu', 'open', 'output', 'refreshTab', 'reload'], - excelIn: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'icon', 'class', 'sheet', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width'], - excelOut: ['label', 'OpenType', 'intertype', 'show', 'icon', 'class', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'resetPageIndex', 'pagination', 'search', 'width'], - popview: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'popClose', 'resetPageIndex', 'width', 'display', 'ratio', 'placement', 'syncComponent', 'clickouter'], - tab: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'linkmenu', 'width'], - innerpage: ['label', 'Ot', 'OpenType', 'pageTemplate', 'show', 'icon', 'class', 'width', 'open'], - funcbutton: ['label', 'OpenType', 'funcType', 'show', 'icon', 'class', 'width'] + pop: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'color', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width', 'openmenu', 'open', 'output', 'refreshTab', 'reload'], + prompt: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'color', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width', 'openmenu', 'open', 'output', 'refreshTab', 'reload'], + exec: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'color', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width', 'openmenu', 'open', 'output', 'refreshTab', 'reload'], + excelIn: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'icon', 'class', 'color', 'sheet', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width'], + excelOut: ['label', 'OpenType', 'intertype', 'show', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'resetPageIndex', 'pagination', 'search', 'width'], + popview: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'color', 'popClose', 'resetPageIndex', 'width', 'display', 'ratio', 'placement', 'syncComponent', 'clickouter'], + tab: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'color', 'linkmenu', 'width'], + innerpage: ['label', 'Ot', 'OpenType', 'pageTemplate', 'show', 'icon', 'class', 'color', 'width', 'open'], + funcbutton: ['label', 'OpenType', 'funcType', 'show', 'icon', 'class', 'color', 'width'] } class ActionForm extends Component { @@ -363,6 +363,7 @@ }) } else if (key === 'sqlType') { let _fieldval = {} + let hasclass = true this.setState({ formlist: this.state.formlist.map(item => { if (item.key === 'Ot') { @@ -373,26 +374,45 @@ } else { item.options = this.state.requireOptions } + } else if (item.key === 'class') { + hasclass = item.forbid !== true } return item }) }, () => { if (value === 'insert') { _fieldval.label = '娣诲姞' - _fieldval.class = 'green' _fieldval.Ot = 'notRequired' + if (hasclass) { + _fieldval.class = 'green' + } else { + _fieldval.color = 'success' + } } else if (value === 'update') { _fieldval.label = '淇敼' - _fieldval.class = 'purple' _fieldval.Ot = 'requiredSgl' + if (hasclass) { + _fieldval.class = 'purple' + } else { + _fieldval.color = 'primary' + } + } else if (value === 'audit') { _fieldval.label = '瀹℃牳' - _fieldval.class = 'primary' _fieldval.Ot = 'requiredSgl' + if (hasclass) { + _fieldval.class = 'primary' + } else { + _fieldval.color = 'warning' + } } else if (value === 'LogicDelete' || value === 'delete') { _fieldval.label = '鍒犻櫎' - _fieldval.class = 'danger' _fieldval.Ot = 'requiredSgl' + if (hasclass) { + _fieldval.class = 'danger' + } else { + _fieldval.color = 'danger' + } } this.props.form.setFieldsValue(_fieldval) diff --git a/src/menu/components/share/actioncomponent/dragaction/card.jsx b/src/menu/components/share/actioncomponent/dragaction/card.jsx index 4a6e8b5..d0baf35 100644 --- a/src/menu/components/share/actioncomponent/dragaction/card.jsx +++ b/src/menu/components/share/actioncomponent/dragaction/card.jsx @@ -4,7 +4,7 @@ import { resetStyle } from '@/utils/utils-custom.js' import './index.scss' -const Card = ({ id, card, moveCard, findCard, editCard, delCard, copyCard, changeStyle, profileCard, doubleClickCard }) => { +const Card = ({ id, card, type, moveCard, findCard, editCard, delCard, copyCard, changeStyle, profileCard, doubleClickCard }) => { const originalIndex = findCard(id).index const [{ isDragging }, drag] = useDrag({ item: { type: 'action', id, originalIndex }, @@ -38,21 +38,30 @@ let btnElement = null let _style = resetStyle(card.style) + let _class = '' + let show = card.show + if (type === 'datacard') { + _style = null + _class = 'swiper swiper-' + card.color + show = 'button' + } - if (card.show === 'icon') { + if (show === 'icon') { btnElement = ( <Button type="link" icon={card.icon} style={_style} + className={_class} onDoubleClick={() => doubleClickCard(id)} >{card.icon ? '' : card.label}</Button> ) - } else if (card.show === 'link') { + } else if (show === 'link') { btnElement = ( <Button type="link" style={_style} + className={_class} onDoubleClick={() => doubleClickCard(id)} >{card.label}{card.icon ? <Icon type={card.icon}/> : null}</Button> ) @@ -61,6 +70,7 @@ <Button icon={card.icon} style={_style} + className={_class} onDoubleClick={() => doubleClickCard(id)} > {card.label} @@ -74,7 +84,7 @@ <Icon className="edit" title="缂栬緫" type="edit" onClick={() => editCard(id)} /> <Icon className="copy" title="澶嶅埗" type="copy" onClick={() => copyCard(id)} /> <Icon className="close" title="鍒犻櫎" type="close" onClick={() => delCard(id)} /> - <Icon className="style" title="璋冩暣鏍峰紡" onClick={() => changeStyle(id)} type="font-colors" /> + {type !== 'datacard' ? <Icon className="style" title="璋冩暣鏍峰紡" onClick={() => changeStyle(id)} type="font-colors" /> : ''} {hasProfile ? <Icon className="profile" title="楠岃瘉" type="profile" onClick={() => profileCard(id)} /> : null} </div> } trigger="hover"> diff --git a/src/menu/components/share/actioncomponent/dragaction/index.jsx b/src/menu/components/share/actioncomponent/dragaction/index.jsx index b2fdd05..cdbc07a 100644 --- a/src/menu/components/share/actioncomponent/dragaction/index.jsx +++ b/src/menu/components/share/actioncomponent/dragaction/index.jsx @@ -7,7 +7,7 @@ import Card from './card' import './index.scss' -const Container = ({list, handleList, handleMenu, deleteMenu, profileMenu, changeBtnStyle, dropButton, doubleClickCard }) => { +const Container = ({list, type, handleList, handleMenu, deleteMenu, profileMenu, changeBtnStyle, dropButton, doubleClickCard }) => { const [cards, setCards] = useState(list) const moveCard = (id, atIndex) => { const { card, index } = findCard(id) @@ -105,6 +105,7 @@ id={card.uuid} key={card.uuid} card={card} + type={type} moveCard={moveCard} copyCard={copyCard} editCard={editCard} diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx index b9efb5c..1cd8396 100644 --- a/src/menu/components/share/actioncomponent/formconfig.jsx +++ b/src/menu/components/share/actioncomponent/formconfig.jsx @@ -473,6 +473,7 @@ label: '鏄剧ず涓�', initVal: card.show || 'button', required: true, + forbid: type === 'datacard' && appType === 'mob', // 绉诲姩绔紝婊戝姩鏄剧ず鐨勬寜閽彧鏄剧ず鏂囧瓧 options: [{ value: 'icon', text: '鍥炬爣' @@ -508,6 +509,7 @@ label: Formdict['model.icon'], initVal: card.icon, required: false, + forbid: type === 'datacard' && appType === 'mob', // 绉诲姩绔紝婊戝姩鏄剧ず鐨勬寜閽彧鏄剧ず鏂囧瓧 options: [] }, { @@ -517,10 +519,35 @@ initVal: card.class, tooltip: '姝ら鑹蹭负鎸夐挳鍒濆鍖栭鑹诧紝鍙湪鏍峰紡璋冩暣涓慨鏀广��', required: false, + forbid: type === 'datacard' && appType === 'mob', // 绉诲姩绔紝婊戝姩鏄剧ず鐨勬寜閽笉璁剧疆閫氱敤棰滆壊 options: [] }, { type: 'radio', + key: 'color', + label: Formdict['model.form.color'], + initVal: card.color || 'primary', + required: false, + forbid: (type !== 'datacard' || appType !== 'mob'), // 绉诲姩绔紝婊戝姩鏄剧ず鐨勬寜閽彧鍙缃浐瀹氶鑹� + options: [{ + value: 'primary', + text: '钃�' + }, { + value: 'danger', + text: '绾�' + }, { + value: 'warning', + text: '姗�' + }, { + value: 'success', + text: '缁�' + }, { + value: 'light', + text: '鐏�' + }] + }, + { + type: 'radio', key: 'joint', label: Formdict['model.form.paramJoint'], initVal: card.joint || 'true', diff --git a/src/menu/components/share/actioncomponent/index.jsx b/src/menu/components/share/actioncomponent/index.jsx index c7718dc..a924679 100644 --- a/src/menu/components/share/actioncomponent/index.jsx +++ b/src/menu/components/share/actioncomponent/index.jsx @@ -449,13 +449,14 @@ } render() { - const { config } = this.props - const { actionlist, visible, card, dict, profVisible } = this.state + const { config, type } = this.props + const { actionlist, visible, appType, card, dict, profVisible } = this.state return ( <div className={'model-menu-action-list'}> <DragElement list={actionlist} + type={appType === 'mob' ? (type || '') : ''} handleList={this.handleList} dropButton={this.dropButton} handleMenu={this.handleAction} diff --git a/src/menu/components/share/actioncomponent/index.scss b/src/menu/components/share/actioncomponent/index.scss index 6141b32..370fdee 100644 --- a/src/menu/components/share/actioncomponent/index.scss +++ b/src/menu/components/share/actioncomponent/index.scss @@ -30,6 +30,25 @@ font-weight: inherit; } } + .swiper { + margin-left: 10px; + color: #ffffff; + } + .swiper-primary { + background-color: #1677ff; + } + .swiper-danger { + background-color: #ff3141; + } + .swiper-warning { + background-color: #ff8f1f; + } + .swiper-success { + background-color: #00b578; + } + .swiper-light { + background-color: #cccccc; + } } } diff --git a/src/menu/components/share/mobPagination/index.jsx b/src/menu/components/share/mobPagination/index.jsx index d46c722..173484d 100644 --- a/src/menu/components/share/mobPagination/index.jsx +++ b/src/menu/components/share/mobPagination/index.jsx @@ -1,18 +1,32 @@ import React, {Component} from 'react' -import { Icon, Pagination } from 'antd-mobile' +import { RightOutlined, LeftOutlined } from '@ant-design/icons' import './index.scss' class MobPagination extends Component { render () { return ( - <Pagination className="mob-pagination" total={5} - current={1} - locale={{ - prevText: (<span><Icon type="left" />涓婁竴椤�</span>), - nextText: (<span>涓嬩竴椤�<Icon type="right" /></span>), - }} - /> + <div className="normal-pagination"> + <div className="mk-flexbox"> + <div className="mk-flexbox-item mk-flexbox-item-prev disabled"> + <LeftOutlined /> 涓婁竴椤� + </div> + <div className="mk-flexbox-item"> + <span className="mk-system-color">1</span>/ + <span>5</span> + </div> + <div className="mk-flexbox-item mk-flexbox-item-next"> + 涓嬩竴椤� <RightOutlined /> + </div> + </div> + </div> + // <Pagination className="mob-pagination" total={5} + // current={1} + // locale={{ + // prevText: (<span><LeftOutlined />涓婁竴椤�</span>), + // nextText: (<span>涓嬩竴椤�<RightOutlined /></span>), + // }} + // /> ) } } diff --git a/src/menu/components/share/mobPagination/index.scss b/src/menu/components/share/mobPagination/index.scss index 2537123..cb28ded 100644 --- a/src/menu/components/share/mobPagination/index.scss +++ b/src/menu/components/share/mobPagination/index.scss @@ -1,14 +1,31 @@ -.mob-pagination { - .am-button::before { - display: none; +.normal-pagination { + margin: 25px 0px 10px; + font-size: 15px; + .mk-flexbox { + overflow: hidden; + display: flex; + align-items: center; } - .am-button { - border: none; - font-size: 16px; - background: transparent; - .am-icon { - position: relative; - top: 5px; - } + .mk-flexbox-item { + box-sizing: border-box; + flex: 1 1; + margin-left: 8px; + min-width: 10px; + text-align: center; + height: 40px; + line-height: 40px; + } + .mk-flexbox-item-prev { + margin-left: 0px; + text-align: left; + padding-left: 15px; + } + .mk-flexbox-item-next { + text-align: right; + padding-right: 15px; + } + .mk-flexbox-item.disabled { + color: rgba(0, 0, 0, 0.3); + opacity: 0.6; } } \ No newline at end of file diff --git a/src/mob/components/search/single-search/index.jsx b/src/mob/components/search/single-search/index.jsx new file mode 100644 index 0000000..2febeb1 --- /dev/null +++ b/src/mob/components/search/single-search/index.jsx @@ -0,0 +1,159 @@ +import React, { Component } from 'react' +import PropTypes from 'prop-types' +import { is, fromJS } from 'immutable' +import { Popover, Icon, Input } from 'antd' + +import zhCN from '@/locales/zh-CN/model.js' +import enUS from '@/locales/en-US/model.js' +import { resetStyle } from '@/utils/utils-custom.js' +import asyncIconComponent from '@/utils/asyncIconComponent' +import getWrapForm from './options' +import MKEmitter from '@/utils/events.js' +import './index.scss' + +const { Search } = Input + +const NormalForm = asyncIconComponent(() => import('@/components/normalform')) + +class SingleSearchComponent extends Component { + static propTpyes = { + card: PropTypes.object, + updateConfig: PropTypes.func, + deletecomponent: PropTypes.func + } + + state = { + dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, + sqlVerifing: false, // sql楠岃瘉涓� + visible: false, // 妯℃�佹鎺у埗 + showField: false, + editcard: null // 缂栬緫涓厓绱� + } + + /** + * @description 鎼滅储鏉′欢鍒濆鍖� + */ + UNSAFE_componentWillMount () { + const { card } = this.props + + if (card.isNew) { + let _card = { + uuid: card.uuid, + type: card.type, + floor: card.floor, + tabId: card.tabId || '', + parentId: card.parentId || '', + width: 24, + name: card.name, + subtype: card.subtype, + wrap: { name: card.name, width: 24, label: '鎼滅储', field: '', show: 'button' }, + style: { + marginLeft: '8px', marginRight: '8px', marginTop: '8px', marginBottom: '8px', + paddingLeft: '10px', paddingRight: '10px', paddingTop: '10px', paddingBottom: '10px', + } + } + this.setState({ + card: _card + }) + this.props.updateConfig(_card) + } else { + this.setState({ + card: fromJS(card).toJS() + }) + } + } + + componentDidMount () { + MKEmitter.addListener('submitStyle', this.getStyle) + } + + /** + * @description 缁勪欢閿�姣侊紝娓呴櫎state鏇存柊 + */ + componentWillUnmount () { + this.setState = () => { + return + } + MKEmitter.removeListener('submitStyle', this.getStyle) + } + + shouldComponentUpdate (nextProps, nextState) { + return !is(fromJS(this.state), fromJS(nextState)) + } + + getStyle = (comIds, style) => { + const { card } = this.state + + if (comIds.length !== 1 || comIds[0] !== card.uuid) return + + let _card = {...card, style} + + this.setState({ + card: _card + }) + + this.props.updateConfig(_card) + } + + changeStyle = () => { + const { card } = this.state + + MKEmitter.emit('changeStyle', [card.uuid], ['background', 'border', 'padding', 'margin', 'shadow'], card.style) + } + + /** + * @description 鍗$墖琛屽灞備俊鎭洿鏂帮紙鏁版嵁婧愶紝鏍峰紡绛夛級 + */ + updateComponent = (component) => { + this.setState({ + card: component + }) + + component.width = component.wrap.width + component.name = component.wrap.name + + this.props.updateConfig(component) + } + + getWrapForms = () => { + const { wrap, action } = this.state.card + + return getWrapForm(wrap, action) + } + + updateWrap = (res) => { + this.updateComponent({...this.state.card, wrap: res}) + } + + clickComponent = (e) => { + if (sessionStorage.getItem('style-control') === 'true' || sessionStorage.getItem('style-control') === 'component') { + e.stopPropagation() + MKEmitter.emit('clickComponent', this.state.card) + } + } + + render() { + const { card } = this.state + let _style = resetStyle(card.style) + + return ( + <div className="single-search-edit-list" onClick={this.clickComponent} id={card.uuid} style={_style}> + <Search placeholder={card.wrap.label} value={card.initval} enterButton /> + <Input placeholder={card.labelShow === 'false' ? card.label : ''} value={card.initval} /> + <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ + <div className="mk-popover-control"> + <NormalForm title="鎼滅储璁剧疆" width={800} update={this.updateWrap} getForms={this.getWrapForms}> + <Icon type="edit" style={{color: '#1890ff'}} title="缂栬緫"/> + </NormalForm> + <Icon className="style" title="璋冩暣鏍峰紡" onClick={this.changeStyle} type="font-colors" /> + <Icon className="close" title="delete" type="delete" onClick={() => this.props.deletecomponent(card.uuid)} /> + </div> + } trigger="hover"> + <Icon type="tool" /> + </Popover> + </div> + ) + } +} + +export default SingleSearchComponent \ No newline at end of file diff --git a/src/mob/components/search/single-search/index.scss b/src/mob/components/search/single-search/index.scss new file mode 100644 index 0000000..5732e1e --- /dev/null +++ b/src/mob/components/search/single-search/index.scss @@ -0,0 +1,26 @@ +.single-search-edit-list { + min-height: 50px; + position: relative; + background: #ffffff; + + >.anticon-tool { + position: absolute; + z-index: 3; + font-size: 16px; + right: 1px; + top: 1px; + cursor: pointer; + padding: 5px; + background: rgba(255, 255, 255, 0.55); + } +} + +.single-search-edit-list::after { + display: block; + content: ' '; + clear: both; +} +.single-search-edit-list:hover { + z-index: 1; + box-shadow: 0px 0px 4px #1890ff; +} \ No newline at end of file diff --git a/src/mob/components/search/single-search/options.jsx b/src/mob/components/search/single-search/options.jsx new file mode 100644 index 0000000..dc3f06e --- /dev/null +++ b/src/mob/components/search/single-search/options.jsx @@ -0,0 +1,88 @@ +/** + * @description Wrap琛ㄥ崟閰嶇疆淇℃伅 + */ +export default function (wrap, action = []) { + let roleList = sessionStorage.getItem('sysRoles') + let appType = sessionStorage.getItem('appType') + + if (roleList) { + try { + roleList = JSON.parse(roleList) + } catch (e) { + roleList = [] + } + } else { + roleList = [] + } + + const wrapForm = [ + { + type: 'text', + field: 'name', + label: '缁勪欢鍚嶇О', + initval: wrap.name || '', + tooltip: '鐢ㄤ簬缁勪欢闂寸殑鍖哄垎銆�', + required: true + }, + { + type: 'number', + field: 'width', + label: '瀹藉害', + initval: wrap.width || 24, + tooltip: '鏍呮牸甯冨眬锛屾瘡琛岀瓑鍒嗕负24鍒椼��', + min: 1, + max: 24, + precision: 0, + required: true + }, + { + type: 'text', + field: 'field', + label: '鎼滅储瀛楁', + initval: wrap.field || '', + tooltip: '澶氫釜瀛楁鍙敤閫楀彿鎷兼帴銆�', + required: true + }, + { + type: 'text', + field: 'label', + label: '鎻愮ず鏂囧瓧', + initval: wrap.label || '', + required: false + }, + { + type: 'radio', + field: 'show', + label: '鎼滅储鏍峰紡', + initval: wrap.show || 'button', + required: false, + options: [ + {value: 'button', label: '鎼滅储鎸夐挳'}, + {value: 'icon', label: '鎼滅储鍥炬爣'}, + {value: 'input', label: '杈撳叆妗�'}, + ] + }, + { + type: 'radio', + field: 'show', + label: '鎼滅储鎸夐挳', + initval: wrap.show || 'true', + required: false, + options: [ + {value: 'true', label: '鏄剧ず'}, + {value: 'false', label: '闅愯棌'}, + ] + }, + { + type: 'multiselect', + field: 'blacklist', + label: '榛戝悕鍗�', + initval: wrap.blacklist || [], + required: false, + options: roleList, + forbid: !!appType + }, + ] + + return wrapForm +} \ No newline at end of file diff --git a/src/mob/components/tabs/antv-tabs/index.jsx b/src/mob/components/tabs/antv-tabs/index.jsx index 87c3979..e2835bd 100644 --- a/src/mob/components/tabs/antv-tabs/index.jsx +++ b/src/mob/components/tabs/antv-tabs/index.jsx @@ -328,7 +328,7 @@ editab.label = res.label editab.icon = res.icon - editab.hasSearch = res.hasSearch || '' + // editab.hasSearch = res.hasSearch || '' editab.blacklist = res.blacklist if (editab.uuid) { @@ -375,7 +375,7 @@ } render() { - const { tabs, appType, defaultActiveKey } = this.state + const { tabs, defaultActiveKey } = this.state let _style = resetStyle(tabs.style) let _tabStyle = resetStyle(tabs.tabStyle) @@ -397,8 +397,8 @@ <span style={_tabStyle}>{tab.icon ? <Icon type={tab.icon} /> : null}{tab.label}</span> </Popover> } key={tab.uuid}> - {appType === 'mob' && tabs.setting.display === 'inline-block' && tab.hasSearch === 'icon' ? - <Icon className="search-icon" onDoubleClick={() => this.setSearch(tab)} type="search" /> : null} + {/* {appType === 'mob' && tabs.setting.display === 'inline-block' && tab.hasSearch === 'icon' ? + <Icon className="search-icon" onDoubleClick={() => this.setSearch(tab)} type="search" /> : null} */} <TabComponents config={tab} handleList={this.updateTabComponent} deleteCard={this.deleteCard} /> </TabPane> ))} diff --git a/src/mob/components/tabs/antv-tabs/options.jsx b/src/mob/components/tabs/antv-tabs/options.jsx index 7d7782b..43ac1d4 100644 --- a/src/mob/components/tabs/antv-tabs/options.jsx +++ b/src/mob/components/tabs/antv-tabs/options.jsx @@ -34,19 +34,19 @@ allowClear: true, span: 22 }, - { - type: 'radio', - field: 'hasSearch', - label: '鎼滅储', - initval: tab.hasSearch || 'false', - required: false, - options: [ - {value: 'false', label: '鏃�'}, - {value: 'icon', label: '鏈�'}, - ], - forbid: appType !== 'mob' || setting.display !== 'inline-block', - span: 22 - }, + // { + // type: 'radio', + // field: 'hasSearch', + // label: '鎼滅储', + // initval: tab.hasSearch || 'false', + // required: false, + // options: [ + // {value: 'false', label: '鏃�'}, + // {value: 'icon', label: '鏈�'}, + // ], + // forbid: appType !== 'mob' || setting.display !== 'inline-block', + // span: 22 + // }, { type: 'multiselect', field: 'blacklist', diff --git a/src/mob/components/topbar/normal-navbar/index.jsx b/src/mob/components/topbar/normal-navbar/index.jsx index a6d7bc0..8bca7bb 100644 --- a/src/mob/components/topbar/normal-navbar/index.jsx +++ b/src/mob/components/topbar/normal-navbar/index.jsx @@ -34,7 +34,7 @@ floor: card.floor, width: 24, subtype: card.subtype, - wrap: { type: 'navbar', height: 50, title: 'NavBar', back: 'true', search: 'false', logout: 'false' }, + wrap: { type: 'navbar', height: 50, title: 'NavBar', back: 'true', logout: 'false' }, style: {boxShadow: '0 0 3px #D9D9D9', shadowColor: '#D9D9D9', shadowBlur: '3px', paddingLeft: '10px', paddingRight: '10px', lineHeight: '2.8', fontSize: '18px' }, searchStyle: {} } @@ -51,8 +51,12 @@ }) this.props.updateConfig(_card) } else { + let _card = fromJS(card).toJS() + if (_card.wrap.type === 'navbar' && _card.wrap.search === 'true') { + _card.wrap.type = 'searchIcon' + } this.setState({ - card: fromJS(card).toJS() + card: _card }) } } @@ -158,7 +162,7 @@ if (!card.search) { card.search = { floor: 1, - setting: { type: 'title', field: '', title: '', focus: 'true', btn: 'hidden' }, + setting: { type: 'title', field: '', title: '', focus: 'true', btn: 'hidden', backgroundColor: sessionStorage.getItem('sysBgColor') }, groups: [], fields: [] } @@ -237,7 +241,7 @@ </div> } <div className="am-navbar-right"> - {card.wrap.search === 'true' ? <Icon type="search" onDoubleClick={this.setSearch}/> : null} + {card.wrap.type === 'searchIcon' ? <Icon type="search" onDoubleClick={this.setSearch}/> : null} {right} </div> </div> diff --git a/src/mob/components/topbar/normal-navbar/options.jsx b/src/mob/components/topbar/normal-navbar/options.jsx index 5af02e8..f00a8b6 100644 --- a/src/mob/components/topbar/normal-navbar/options.jsx +++ b/src/mob/components/topbar/normal-navbar/options.jsx @@ -23,18 +23,16 @@ required: false, options: [ {value: 'navbar', label: '瀵艰埅鏍�'}, - {value: 'search', label: '鎼滅储鏍�'}, + {value: 'search', label: '鎼滅储妗�'}, + {value: 'searchIcon', label: '鎼滅储鏍�'}, ], - controlFields: [ - {field: 'search', values: ['navbar']}, - ] }, { type: 'text', field: 'title', label: '鏍囬', initval: wrap.title || '', - tooltip: '浣跨敤鎼滅储鏍忔椂锛屾爣棰樼敤浜庢悳绱㈡潯浠堕殣钘忔椂鏄剧ず銆�', + tooltip: '浣跨敤鎼滅储妗嗘椂锛屾爣棰樼敤浜庢悳绱㈡潯浠堕殣钘忔椂锛堝綋鍚敤榛戝悕鍗曪紝鐧诲綍鐢ㄦ埛鏃犳潈闄愭椂锛夋樉绀恒��', required: false }, { @@ -51,17 +49,17 @@ {field: 'reload', values: ['true']}, ] }, - { - type: 'radio', - field: 'search', - label: '鎼滅储', - initval: wrap.search || 'false', - required: false, - options: [ - {value: 'true', label: '鏄剧ず'}, - {value: 'false', label: '闅愯棌'}, - ] - }, + // { + // type: 'radio', + // field: 'search', + // label: '鎼滅储', + // initval: wrap.search || 'false', + // required: false, + // options: [ + // {value: 'true', label: '鏄剧ず'}, + // {value: 'false', label: '闅愯棌'}, + // ] + // }, { type: 'radio', field: 'logout', diff --git a/src/mob/mobshell/card.jsx b/src/mob/mobshell/card.jsx index b9bb62b..b03a40f 100644 --- a/src/mob/mobshell/card.jsx +++ b/src/mob/mobshell/card.jsx @@ -5,7 +5,7 @@ import './index.scss' const AntvBar = asyncComponent(() => import('@/menu/components/chart/antv-bar')) -// const MainSearch = asyncComponent(() => import('@/menu/components/search/main-search')) +const MainSearch = asyncComponent(() => import('@/mob/components/search/single-search')) const AntvPie = asyncComponent(() => import('@/menu/components/chart/antv-pie')) const AntvDashboard = asyncComponent(() => import('@/menu/components/chart/antv-dashboard')) const AntvScatter = asyncComponent(() => import('@/menu/components/chart/antv-scatter')) @@ -81,8 +81,8 @@ const getCardComponent = () => { if (card.type === 'bar' || card.type === 'line') { return (<AntvBar card={card} updateConfig={updateConfig} deletecomponent={delCard}/>) - // } else if (card.type === 'search') { - // return (<MainSearch card={card} updateConfig={updateConfig} deletecomponent={delCard}/>) + } else if (card.type === 'search') { + return (<MainSearch card={card} updateConfig={updateConfig} deletecomponent={delCard}/>) } else if (card.type === 'pie') { return (<AntvPie card={card} updateConfig={updateConfig} deletecomponent={delCard}/>) } else if (card.type === 'dashboard') { diff --git a/src/mob/modalconfig/index.jsx b/src/mob/modalconfig/index.jsx index 3c54c06..227d758 100644 --- a/src/mob/modalconfig/index.jsx +++ b/src/mob/modalconfig/index.jsx @@ -399,6 +399,19 @@ }) } + clearConfig = () => { + const _this = this + let _config = {...this.state.config, fields: []} + + confirm({ + content: '纭畾娓呯┖琛ㄥ崟鍚楋紵', + onOk() { + _this.setState({ config: _config }) + }, + onCancel() {} + }) + } + render () { const { config, dict, saving } = this.state @@ -422,6 +435,7 @@ <Button type="primary" loading={saving} onClick={this.submitConfig}>淇濆瓨</Button> <Button onClick={this.cancelConfig}>杩斿洖</Button> <PasteComponent config={config} updateConfig={this.insert} /> + <Button type="danger" onClick={this.clearConfig}>娓呯┖</Button> <Switch checkedChildren={dict['model.switch.open']} unCheckedChildren={dict['model.switch.close']} defaultChecked={this.state.showField} onChange={(val) => this.setState({showField: val})} /> </div> <div className="setting"> diff --git a/src/mob/modulesource/option.jsx b/src/mob/modulesource/option.jsx index 9b9efc5..2da6dae 100644 --- a/src/mob/modulesource/option.jsx +++ b/src/mob/modulesource/option.jsx @@ -13,7 +13,7 @@ import SandBox from '@/assets/mobimg/sandbox.png' import Pie1 from '@/assets/mobimg/ring.png' import Pie2 from '@/assets/mobimg/nightingale.png' -// import Mainsearch from '@/assets/mobimg/mainsearch.png' +import Mainsearch from '@/assets/mobimg/mainsearch.png' import Navbar from '@/assets/mobimg/navbar-mob.png' import Carousel from '@/assets/mobimg/carousel.png' import Carousel1 from '@/assets/mobimg/carousel1.png' @@ -32,7 +32,7 @@ { type: 'menu', url: Navbar, component: 'navbar', subtype: 'tabbar', title: '鑿滃崟鏍�' }, { type: 'menu', url: MenuBar, component: 'menubar', subtype: 'menubar', title: '鑿滃崟' }, { type: 'menu', url: tabs, component: 'tabs', subtype: 'tabs', title: '鏍囩椤�', width: 24 }, - // { type: 'menu', url: Mainsearch, component: 'search', subtype: 'mainsearch', title: '鎼滅储鏉′欢', width: 24 }, + { type: 'menu', url: Mainsearch, component: 'search', subtype: 'mainsearch', title: '鎼滅储鏉′欢', width: 24 }, { type: 'menu', url: card1, component: 'card', subtype: 'datacard', title: '鏁版嵁鍗�', width: 24 }, { type: 'menu', url: card2, component: 'card', subtype: 'propcard', title: '灞炴�у崱', width: 24 }, { type: 'menu', url: card2, component: 'balcony', subtype: 'balcony', title: '娴姩鍗�', width: 24 }, diff --git a/src/mob/searchconfig/index.jsx b/src/mob/searchconfig/index.jsx index 25dde68..d559c28 100644 --- a/src/mob/searchconfig/index.jsx +++ b/src/mob/searchconfig/index.jsx @@ -406,7 +406,7 @@ let _g = { uuid: Utils.getuuid(), wrap: { name: 'name', icon: '' }, - setting: { type: 'title', field: '', title: '', focus: 'true', btn: 'hidden' }, + setting: { type: 'title', field: '', title: '', focus: 'true', btn: 'hidden', backgroundColor: sessionStorage.getItem('sysBgColor') }, fields: [] } diff --git a/src/mob/searchconfig/searchdragelement/card.jsx b/src/mob/searchconfig/searchdragelement/card.jsx index 388db7c..7441342 100644 --- a/src/mob/searchconfig/searchdragelement/card.jsx +++ b/src/mob/searchconfig/searchdragelement/card.jsx @@ -1,7 +1,7 @@ import React from 'react' import { useDrag, useDrop } from 'react-dnd' import { Icon, Popover, Form } from 'antd' -import { Range } from 'antd-mobile' +import { Slider } from 'antd-mobile' import moment from 'moment' import asyncComponent from '@/utils/asyncComponent' @@ -72,9 +72,10 @@ <div className="am-list-line"> {card.labelShow !== 'false' ? <div className="am-input-label">{card.label}</div> : null} <div className="am-input-control"> - <Range + <Slider min={card.minValue || 0} max={card.maxValue || 20} + range={true} value={value} /> </div> diff --git a/src/mob/searchconfig/settingform/index.jsx b/src/mob/searchconfig/settingform/index.jsx index 3baffbb..5dbc386 100644 --- a/src/mob/searchconfig/settingform/index.jsx +++ b/src/mob/searchconfig/settingform/index.jsx @@ -89,7 +89,7 @@ </Col> <Col span={12}> <Form.Item label={ - <Tooltip placement="topLeft" title="浣跨敤鎼滅储鏍忔椂锛屾爣棰樼敤浜庢悳绱㈡潯浠堕殣钘忔椂鏄剧ず銆�"> + <Tooltip placement="topLeft" title="浣跨敤鎼滅储鏍忔椂锛屾爣棰樼敤浜庢悳绱㈡潯浠堕殣钘忔椂锛堝綋鍚敤榛戝悕鍗曪紝鐧诲綍鐢ㄦ埛鏃犳潈闄愭椂锛夋樉绀恒��"> <QuestionCircleOutlined className="mk-form-tip" /> 鏍囬 </Tooltip> diff --git a/src/pc/createview/index.jsx b/src/pc/createview/index.jsx index a297cd1..bff41f3 100644 --- a/src/pc/createview/index.jsx +++ b/src/pc/createview/index.jsx @@ -71,7 +71,10 @@ tables: [], components: [], viewType: 'menu', - style: {} + statusBarbgColor: sessionStorage.getItem('sysBgColor') || '#ffffff', + style: { + backgroundColor: sessionStorage.getItem('sysBgColor') || '#ffffff' + } } let param = { @@ -163,6 +166,7 @@ config.components = MenuUtils.resetConfig(_config.components) config.tables = _config.tables || [] config.style = _config.style || {} + config.statusBarbgColor = _config.statusBarbgColor || '' } param.LongParam = window.btoa(window.encodeURIComponent(JSON.stringify(config))) diff --git a/src/tabviews/custom/components/card/cardcellList/index.jsx b/src/tabviews/custom/components/card/cardcellList/index.jsx index 318f6bd..cad09f4 100644 --- a/src/tabviews/custom/components/card/cardcellList/index.jsx +++ b/src/tabviews/custom/components/card/cardcellList/index.jsx @@ -90,6 +90,19 @@ return } + if (card.linkType === 'tel') { + window.open('tel:' + url) + return + } else if (card.linkType === 'email') { + let _url = 'mailto:' + url + let fullName = sessionStorage.getItem('Full_Name') || '' + if (fullName) { + _url = _url + `?subject=鏉ヨ嚜${fullName}鐨勯偖浠禶 + } + window.open(_url) + return + } + if (/^sso$/ig.test(url)) { if (!data.LinkUrl1) { notification.warning({ diff --git a/src/templates/modalconfig/index.jsx b/src/templates/modalconfig/index.jsx index 2de5b42..5da9692 100644 --- a/src/templates/modalconfig/index.jsx +++ b/src/templates/modalconfig/index.jsx @@ -670,6 +670,20 @@ }) } + clearConfig = () => { + const _this = this + let _config = {...this.state.config, fields: []} + + confirm({ + content: '纭畾娓呯┖琛ㄥ崟鍚楋紵', + onOk() { + _this.setState({ config: _config }) + }, + onCancel() {} + }) + } + + render () { const { editAction } = this.props const { config, dict, openEdition } = this.state @@ -706,6 +720,7 @@ <div className="setting"> <Card title="琛ㄥ崟閰嶇疆" bordered={false} extra={ <div> + <Button type="danger" onClick={this.clearConfig}>娓呯┖</Button> <Versions MenuId={editAction.uuid} open_edition={openEdition} updateConfig={this.refreshConfig}/> <ReplaceField type="form" config={config} updateConfig={this.updateconfig}/> <EditComponent dict={dict} options={['form']} config={this.state.config} plusFields={this.plusFields}/> diff --git a/src/templates/zshare/editcomponent/index.jsx b/src/templates/zshare/editcomponent/index.jsx index cbc5832..a642c43 100644 --- a/src/templates/zshare/editcomponent/index.jsx +++ b/src/templates/zshare/editcomponent/index.jsx @@ -93,7 +93,7 @@ if (targetKeys.length === 0) { notification.warning({ top: 92, - message: dict['form.required.select'] + dict['header.form.thawbutton'], + message: dict['form.required.select'] + '瑙e喕鎸夐挳', duration: 5 }) } else { @@ -203,11 +203,11 @@ return ( <div style={{display: 'inline-block'}}> - {MenuID ? <Button className="mk-border-green" onClick={this.handleThaw} icon="unlock">{dict['header.form.thawbutton']}</Button> : null} + {MenuID ? <Button className="mk-border-green" onClick={this.handleThaw} icon="unlock">瑙e喕鎸夐挳</Button> : null} <Button style={{borderColor: '#40a9ff', color: '#40a9ff'}} onClick={() => this.setState({pasteVisible: true})} icon="snippets">{dict['header.form.paste']}</Button> {/* 瑙e喕鎸夐挳妯℃�佹 */} <Modal - title={dict['header.form.thawbutton']} + title="瑙e喕鎸夐挳" visible={this.state.thawVisible} onOk={this.thawBtnSubmit} onCancel={() => {this.setState({thawVisible: false, thawbtnlist: null, targetKeys: []})}} diff --git a/src/utils/utils-datamanage.js b/src/utils/utils-datamanage.js index d024e99..4b98d65 100644 --- a/src/utils/utils-datamanage.js +++ b/src/utils/utils-datamanage.js @@ -201,8 +201,8 @@ // 娴嬭瘯绯荤粺鎵撳嵃鏌ヨ璇彞 if ((options.sysType === 'local' && !window.GLOB.systemType) || window.debugger === true) { - _customScript && console.info(`${setting.$name ? `/*${setting.$name} 鑷畾涔夎剼鏈�*/\n` : ''}${LText ? '' : '/*涓嶆墽琛岄粯璁ql*/\n'}${_customScript}`) - LText && console.info(`${setting.$name ? `/*${setting.$name} 鏁版嵁婧�*/\n` : ''}` + LText) + _customScript && console.info(`${setting.$name ? `/*${setting.$name} 鑷畾涔夎剼鏈�*/\n` : ''}${LText ? '' : '/*涓嶆墽琛岄粯璁ql*/\n'}${_customScript}`) + LText && console.info(`${setting.$name ? `/*${setting.$name} 鏁版嵁婧�*/\n` : ''}` + LText) } if (setting.$name) { @@ -213,6 +213,25 @@ param.LText = Utils.formatOptions(LText) param.DateCount = Utils.formatOptions(DateCount) + // 澶氬眰缁撴瀯鏁版嵁 + // LText = `SELECT a.id as bid,a.ID,a.workerCode,a.workerName,a.jobName,a.Initials,case when isnull(m.friend_id ,'') ='' then '' + // when isnull(m.status,0)=10 then '宸叉坊鍔�' else '寰呴�氳繃' end as friend_text + // ,case when images='' then 'http://epc.mk9h.cn/Content/images/upload/img/kane.jpg' else images end as icon FROM + // (select friend_id,status from oa_mail_list where userid='sso202004100959326131C0805998B6745F886F9' and Initials=case when right('0',1)='0' then Initials else '0' end + // and status=10 and deleted=0) m + // inner join (select * from BD_workers where + // Initials=case when right('0',1)='0' then Initials else '0' end and deleted=0 ) a + // on a.id=m.friend_id ` + // param.custom_script = '' + // param.LText = Utils.formatOptions(LText) + // param.DateCount = '' + // param.prm_field = 'workerCode' + // param.arr_field = 'workerName,jobName' + // param.tabid = 'ID' + // param.parid = 'BID' + // param.sub_name = 'sub_data' + // param.sub_field = 'BID,friend_text,icon,Initials' + // exec_type: 'y' 瑙g爜瀛楁锛歀Text銆丩Text1銆丩Text2銆乧ustom_script銆丏ateCount param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') -- Gitblit v1.8.0