diff --git a/package-lock.json b/package-lock.json index a8c28338e..9cc2464ea 100644 --- a/package-lock.json +++ b/package-lock.json @@ -719,7 +719,7 @@ }, "abbrev": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "resolved": "http://173.15.15.82:8081/repository/npm-all/abbrev/-/abbrev-1.1.1.tgz", "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", "dev": true }, @@ -1088,9 +1088,9 @@ "dev": true }, "are-we-there-yet": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", - "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", + "version": "1.1.7", + "resolved": "http://173.15.15.82:8081/repository/npm-all/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz", + "integrity": "sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g==", "dev": true, "requires": { "delegates": "^1.0.0", @@ -1266,8 +1266,8 @@ }, "async-foreach": { "version": "0.1.3", - "resolved": "https://registry.npmjs.org/async-foreach/-/async-foreach-0.1.3.tgz", - "integrity": "sha1-NhIfhFwFeBct5Bmpfb6x0W7DRUI=", + "resolved": "http://173.15.15.82:8081/repository/npm-all/async-foreach/-/async-foreach-0.1.3.tgz", + "integrity": "sha512-VUeSMD8nEGBWaZK4lizI1sf3yEC7pnAQ/mrI7pC2fBz2s/tq5jWWEngTwaf0Gruu/OoXRGLGg1XFqpYBiGTYJA==", "dev": true }, "async-limiter": { @@ -2537,8 +2537,8 @@ }, "block-stream": { "version": "0.0.9", - "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", - "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", + "resolved": "http://173.15.15.82:8081/repository/npm-all/block-stream/-/block-stream-0.0.9.tgz", + "integrity": "sha512-OorbnJVPII4DuUKbjARAe8u8EfqOmkEEaSFIyoQ7OjTHn6kafxWl0wLgoZ2rXaYd7MyLcDaU4TmhfxtwgcccMQ==", "dev": true, "requires": { "inherits": "~2.0.0" @@ -3790,8 +3790,8 @@ }, "console-control-strings": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", + "resolved": "http://173.15.15.82:8081/repository/npm-all/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", "dev": true }, "constants-browserify": { @@ -3846,6 +3846,21 @@ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" }, + "copy-anything": { + "version": "2.0.6", + "resolved": "http://173.15.15.82:8081/repository/npm-all/copy-anything/-/copy-anything-2.0.6.tgz", + "integrity": "sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw==", + "requires": { + "is-what": "^3.14.1" + }, + "dependencies": { + "is-what": { + "version": "3.14.1", + "resolved": "http://173.15.15.82:8081/repository/npm-all/is-what/-/is-what-3.14.1.tgz", + "integrity": "sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==" + } + } + }, "copy-concurrently": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", @@ -4737,8 +4752,8 @@ }, "delegates": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", + "resolved": "http://173.15.15.82:8081/repository/npm-all/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", "dev": true }, "depd": { @@ -7762,7 +7777,7 @@ }, "fstream": { "version": "1.0.12", - "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz", + "resolved": "http://173.15.15.82:8081/repository/npm-all/fstream/-/fstream-1.0.12.tgz", "integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==", "dev": true, "requires": { @@ -7784,8 +7799,8 @@ }, "gauge": { "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", - "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "resolved": "http://173.15.15.82:8081/repository/npm-all/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha512-14x4kjc6lkD3ltw589k0NrPD6cCNTD6CWoVUNpB85+DrtONoZn+Rug6xZU5RvSC4+TZPxA5AnBibQYAvZn41Hg==", "dev": true, "requires": { "aproba": "^1.0.3", @@ -7800,8 +7815,8 @@ "dependencies": { "is-fullwidth-code-point": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "resolved": "http://173.15.15.82:8081/repository/npm-all/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==", "dev": true, "requires": { "number-is-nan": "^1.0.0" @@ -7809,8 +7824,8 @@ }, "string-width": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "resolved": "http://173.15.15.82:8081/repository/npm-all/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==", "dev": true, "requires": { "code-point-at": "^1.0.0", @@ -7822,7 +7837,7 @@ }, "gaze": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/gaze/-/gaze-1.1.3.tgz", + "resolved": "http://173.15.15.82:8081/repository/npm-all/gaze/-/gaze-1.1.3.tgz", "integrity": "sha512-BRdNm8hbWzFzWHERTrejLqwHDfS4GibPoq5wjTPIoJHoBtKGPg3xAFfxmM+9ztbXelxcf2hwQcaz1PtmFeue8g==", "dev": true, "requires": { @@ -7961,13 +7976,13 @@ } }, "globule": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/globule/-/globule-1.3.1.tgz", - "integrity": "sha512-OVyWOHgw29yosRHCHo7NncwR1hW5ew0W/UrvtwvjefVJeQ26q4/8r8FmPsSF1hJ93IgWkyv16pCTz6WblMzm/g==", + "version": "1.3.4", + "resolved": "http://173.15.15.82:8081/repository/npm-all/globule/-/globule-1.3.4.tgz", + "integrity": "sha512-OPTIfhMBh7JbBYDpa5b+Q5ptmMWKwcNcFSR/0c6t8V4f3ZAVBEsKNY37QdVqmLRYSMhOUGYrY0QhSoEpzGr/Eg==", "dev": true, "requires": { "glob": "~7.1.1", - "lodash": "~4.17.12", + "lodash": "^4.17.21", "minimatch": "~3.0.2" } }, @@ -8148,8 +8163,8 @@ }, "has-unicode": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", + "resolved": "http://173.15.15.82:8081/repository/npm-all/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==", "dev": true }, "has-value": { @@ -8962,7 +8977,7 @@ }, "in-publish": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.1.tgz", + "resolved": "http://173.15.15.82:8081/repository/npm-all/in-publish/-/in-publish-2.0.1.tgz", "integrity": "sha512-oDM0kUSNFC31ShNxHKUyfZKy8ZeXZBWMjMdZHKLOk13uvT27VTL/QzRGfRUcevJhpkZAvlhPYuXkF7eNWrtyxQ==", "dev": true }, @@ -10318,29 +10333,49 @@ } }, "less": { +<<<<<<< HEAD "version": "3.9.0", "resolved": "https://registry.npmjs.org/less/-/less-3.9.0.tgz", "integrity": "sha512-31CmtPEZraNUtuUREYjSqRkeETFdyEHSEPAGq4erDlUXtda7pzNmctdljdIagSb589d/qXGWiiP31R5JVf+v0w==", +======= + "version": "3.13.1", + "resolved": "http://173.15.15.82:8081/repository/npm-all/less/-/less-3.13.1.tgz", + "integrity": "sha512-SwA1aQXGUvp+P5XdZslUOhhLnClSLIjWvJhmd+Vgib5BFIr9lMNlQwmwUNOjXThF/A0x+MCYYPeWEfeWiLRnTw==", +>>>>>>> 5fbac9d61caef2b1bf07294acae99fc74a2ebe1a "requires": { - "clone": "^2.1.2", + "copy-anything": "^2.0.1", "errno": "^0.1.1", "graceful-fs": "^4.1.2", "image-size": "~0.5.0", + "make-dir": "^2.1.0", "mime": "^1.4.1", - "mkdirp": "^0.5.0", - "promise": "^7.1.1", - "request": "^2.83.0", - "source-map": "~0.6.0" + "native-request": "^1.0.5", + "source-map": "~0.6.0", + "tslib": "^1.10.0" }, "dependencies": { +<<<<<<< HEAD "promise": { "version": "7.3.1", "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", +======= + "make-dir": { + "version": "2.1.0", + "resolved": "http://173.15.15.82:8081/repository/npm-all/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", +>>>>>>> 5fbac9d61caef2b1bf07294acae99fc74a2ebe1a "optional": true, "requires": { - "asap": "~2.0.3" + "pify": "^4.0.1", + "semver": "^5.6.0" } + }, + "pify": { + "version": "4.0.1", + "resolved": "http://173.15.15.82:8081/repository/npm-all/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "optional": true } } }, @@ -11138,6 +11173,12 @@ } } }, + "native-request": { + "version": "1.1.0", + "resolved": "http://173.15.15.82:8081/repository/npm-all/native-request/-/native-request-1.1.0.tgz", + "integrity": "sha512-uZ5rQaeRn15XmpgE0xoPL8YWqcX90VtCFglYwAgkvKM5e8fog+vePLAhHxuuv/gRkrQxIeh5U3q9sMNUrENqWw==", + "optional": true + }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -11178,7 +11219,7 @@ }, "node-gyp": { "version": "3.8.0", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.8.0.tgz", + "resolved": "http://173.15.15.82:8081/repository/npm-all/node-gyp/-/node-gyp-3.8.0.tgz", "integrity": "sha512-3g8lYefrRRzvGeSowdJKAKyks8oUpLEd/DyPV4eMhVlhJ0aNaZqIrNUIPuEWWTAoPqyFkfGrM67MC69baqn6vA==", "dev": true, "requires": { @@ -11198,8 +11239,8 @@ "dependencies": { "semver": { "version": "5.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", - "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", + "resolved": "http://173.15.15.82:8081/repository/npm-all/semver/-/semver-5.3.0.tgz", + "integrity": "sha512-mfmm3/H9+67MCVix1h+IXTpDwL6710LyHuk7+cWC9T1mE0qz4iHhh6r4hU2wrIT9iTsAAC2XQRvfblL028cpLw==", "dev": true } } @@ -11272,9 +11313,9 @@ "integrity": "sha512-wp8zyQVwef2hpZ/dJH7SfSrIPD6YoJz6BDQDpGEkcA0s3LpAQoxBIYmfIq6QAhC1DhwsyCgTaTTcONwX8qzCuQ==" }, "node-sass": { - "version": "4.14.0", - "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.14.0.tgz", - "integrity": "sha512-AxqU+DFpk0lEz95sI6jO0hU0Rwyw7BXVEv6o9OItoXLyeygPeaSpiV4rwQb10JiTghHaa0gZeD21sz+OsQluaw==", + "version": "4.14.1", + "resolved": "http://173.15.15.82:8081/repository/npm-all/node-sass/-/node-sass-4.14.1.tgz", + "integrity": "sha512-sjCuOlvGyCJS40R8BscF5vhVlQjNN069NtQ1gSxyK1u9iqvn6tf7O1R4GNowVZfiZUCRt5MmMs1xd+4V/7Yr0g==", "dev": true, "requires": { "async-foreach": "^0.1.3", @@ -11291,15 +11332,15 @@ "node-gyp": "^3.8.0", "npmlog": "^4.0.0", "request": "^2.88.0", - "sass-graph": "^2.2.4", + "sass-graph": "2.2.5", "stdout-stream": "^1.4.0", "true-case-path": "^1.0.2" }, "dependencies": { "cross-spawn": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-3.0.1.tgz", - "integrity": "sha1-ElYDfsufDF9549bvE14wdwGEuYI=", + "resolved": "http://173.15.15.82:8081/repository/npm-all/cross-spawn/-/cross-spawn-3.0.1.tgz", + "integrity": "sha512-eZ+m1WNhSZutOa/uRblAc9Ut5MQfukFrFMtPSm3bZCA888NmMd5AWXWdgRZ80zd+pTk1P2JrGjg9pUPTvl2PWQ==", "dev": true, "requires": { "lru-cache": "^4.0.1", @@ -11310,8 +11351,8 @@ }, "nopt": { "version": "3.0.6", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", + "resolved": "http://173.15.15.82:8081/repository/npm-all/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg==", "dev": true, "requires": { "abbrev": "1" @@ -11367,7 +11408,7 @@ }, "npmlog": { "version": "4.1.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "resolved": "http://173.15.15.82:8081/repository/npm-all/npmlog/-/npmlog-4.1.2.tgz", "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", "dev": true, "requires": { @@ -11676,7 +11717,7 @@ }, "osenv": { "version": "0.1.5", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", + "resolved": "http://173.15.15.82:8081/repository/npm-all/osenv/-/osenv-0.1.5.tgz", "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", "dev": true, "requires": { @@ -15866,81 +15907,170 @@ } }, "sass-graph": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.4.tgz", - "integrity": "sha1-E/vWPNHK8JCLn9k0dq1DpR0eC0k=", + "version": "2.2.5", + "resolved": "http://173.15.15.82:8081/repository/npm-all/sass-graph/-/sass-graph-2.2.5.tgz", + "integrity": "sha512-VFWDAHOe6mRuT4mZRd4eKE+d8Uedrk6Xnh7Sh9b4NGufQLQjOrvf/MQoOdx+0s92L89FeyUUNfU597j/3uNpag==", "dev": true, "requires": { "glob": "^7.0.0", "lodash": "^4.0.0", "scss-tokenizer": "^0.2.3", - "yargs": "^7.0.0" + "yargs": "^13.3.2" }, "dependencies": { + "ansi-regex": { + "version": "4.1.1", + "resolved": "http://173.15.15.82:8081/repository/npm-all/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", + "dev": true + }, "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", + "version": "5.3.1", + "resolved": "http://173.15.15.82:8081/repository/npm-all/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true }, "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "version": "5.0.0", + "resolved": "http://173.15.15.82:8081/repository/npm-all/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", "dev": true, "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" } }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "emoji-regex": { + "version": "7.0.3", + "resolved": "http://173.15.15.82:8081/repository/npm-all/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "find-up": { + "version": "3.0.0", + "resolved": "http://173.15.15.82:8081/repository/npm-all/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "dev": true, "requires": { - "number-is-nan": "^1.0.0" + "locate-path": "^3.0.0" } }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "http://173.15.15.82:8081/repository/npm-all/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "locate-path": { + "version": "3.0.0", + "resolved": "http://173.15.15.82:8081/repository/npm-all/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "http://173.15.15.82:8081/repository/npm-all/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "http://173.15.15.82:8081/repository/npm-all/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "http://173.15.15.82:8081/repository/npm-all/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "http://173.15.15.82:8081/repository/npm-all/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "version": "3.1.0", + "resolved": "http://173.15.15.82:8081/repository/npm-all/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "dev": true, "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" } }, - "yargs": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz", - "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", + "strip-ansi": { + "version": "5.2.0", + "resolved": "http://173.15.15.82:8081/repository/npm-all/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "dev": true, "requires": { - "camelcase": "^3.0.0", - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "os-locale": "^1.4.0", - "read-pkg-up": "^1.0.1", + "ansi-regex": "^4.1.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "http://173.15.15.82:8081/repository/npm-all/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q==", + "dev": true + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "http://173.15.15.82:8081/repository/npm-all/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + } + }, + "y18n": { + "version": "4.0.3", + "resolved": "http://173.15.15.82:8081/repository/npm-all/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "dev": true + }, + "yargs": { + "version": "13.3.2", + "resolved": "http://173.15.15.82:8081/repository/npm-all/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "dev": true, + "requires": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", + "require-main-filename": "^2.0.0", "set-blocking": "^2.0.0", - "string-width": "^1.0.2", - "which-module": "^1.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^5.0.0" - }, - "dependencies": { - "y18n": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz", - "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==", - "dev": true - } + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + } + }, + "yargs-parser": { + "version": "13.1.2", + "resolved": "http://173.15.15.82:8081/repository/npm-all/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" } } } @@ -16116,8 +16246,8 @@ }, "scss-tokenizer": { "version": "0.2.3", - "resolved": "https://registry.npmjs.org/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz", - "integrity": "sha1-jrBtualyMzOCTT9VMGQRSYR85dE=", + "resolved": "http://173.15.15.82:8081/repository/npm-all/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz", + "integrity": "sha512-dYE8LhncfBUar6POCxMTm0Ln+erjeczqEvCJib5/7XNkdw1FkUGgwMPY360FY0FgPWQxHWCx29Jl3oejyGLM9Q==", "dev": true, "requires": { "js-base64": "^2.1.8", @@ -16126,8 +16256,8 @@ "dependencies": { "source-map": { "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "resolved": "http://173.15.15.82:8081/repository/npm-all/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha512-Y8nIfcb1s/7DcobUz1yOO1GSp7gyL+D9zLHDehT7iRESqGSxjJ448Sg7rvfgsRJCnKLdSl11uGf0s9X80cH0/A==", "dev": true, "requires": { "amdefine": ">=0.0.4" @@ -17133,7 +17263,7 @@ }, "stdout-stream": { "version": "1.4.1", - "resolved": "https://registry.npmjs.org/stdout-stream/-/stdout-stream-1.4.1.tgz", + "resolved": "http://173.15.15.82:8081/repository/npm-all/stdout-stream/-/stdout-stream-1.4.1.tgz", "integrity": "sha512-j4emi03KXqJWcIeF8eIXkjMFN1Cmb8gUlDYGeBALLPo5qdyTfA9bOtl8m33lRoC+vFMkP3gl0WsDr6+gzxbbTA==", "dev": true, "requires": { @@ -17671,7 +17801,7 @@ }, "tar": { "version": "2.2.2", - "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.2.tgz", + "resolved": "http://173.15.15.82:8081/repository/npm-all/tar/-/tar-2.2.2.tgz", "integrity": "sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA==", "dev": true, "requires": { @@ -18081,7 +18211,7 @@ }, "true-case-path": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-1.0.3.tgz", + "resolved": "http://173.15.15.82:8081/repository/npm-all/true-case-path/-/true-case-path-1.0.3.tgz", "integrity": "sha512-m6s2OdQe5wgpFMC+pAJ+q9djG82O2jcHPOI6RNg1yy9rCYR+WD6Nbpl32fDpfC56nirdRy+opFa/Vk7HYhqaew==", "dev": true, "requires": { @@ -20105,12 +20235,12 @@ "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=" }, "wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "version": "1.1.5", + "resolved": "http://173.15.15.82:8081/repository/npm-all/wide-align/-/wide-align-1.1.5.tgz", + "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", "dev": true, "requires": { - "string-width": "^1.0.2 || 2" + "string-width": "^1.0.2 || 2 || 3 || 4" } }, "widest-line": { diff --git a/package.json b/package.json index 63d2139c4..efea85d1a 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "js-base64": "^2.5.2", "js2wordcloud": "^1.1.12", "katex": "^0.11.1", - "less": "^3.9.0", + "less": "^3.13.1", "less-loader": "^4.1.0", "lodash": "^4.17.21", "loglevel": "^1.6.8", @@ -209,7 +209,7 @@ "concat": "^1.0.3", "happypack": "^5.0.1", "mockjs": "^1.1.0", - "node-sass": "^4.12.0", + "node-sass": "^4.14.1", "optimize-css-assets-webpack-plugin": "^5.0.3", "purgecss": "^2.1.2", "react-json-view": "^1.21.3", diff --git a/src/App.css b/src/App.css index 55bdd7f46..52fe45441 100644 --- a/src/App.css +++ b/src/App.css @@ -60,8 +60,13 @@ body { .ant-progress-textno { color: #f5222d; } -.CodeMirror pre.CodeMirror-line{ - font-size: 16px!important; +.CodeMirror .CodeMirror-lines pre.CodeMirror-line{ + font-size: 16px; + line-height: 20px; + font-family:"PingFang SC", "Segoe UI", Helvetica, Arial, "Apple Color Emoji", SimHei, SimSun, sans-serif, "Microsoft YaHei"; +} +.react-codemirror2 .CodeMirror .CodeMirror-lines pre.CodeMirror-line{ + font-size: 12px; } /* md多空格 */ .markdown-body p { diff --git a/src/App.js b/src/App.js index 9f794a180..2d17a1864 100644 --- a/src/App.js +++ b/src/App.js @@ -18,7 +18,7 @@ import moment from 'moment' import { MuiThemeProvider, createMuiTheme } from 'material-ui/styles'; import SiderBar from './forge/Component/SiderBar'; import SiderBarHelp from './glcc/siderBarHelp'; -import GlccModal from './modules/glccModal'; +// import GlccModal from './modules/glccModal'; import { SnackbarHOC } from 'educoder'; import { initAxiosInterceptors } from './AppConfig' @@ -293,7 +293,7 @@ class App extends Component { this.Modifyloginvalue()}> - + {/* */} {!pathName || (pathName && pathName.indexOf("glcc") === -1) ? : } {/* */} diff --git a/src/AppConfig.js b/src/AppConfig.js index a55649ce0..f771b9eab 100644 --- a/src/AppConfig.js +++ b/src/AppConfig.js @@ -25,7 +25,7 @@ if (isDev) { } debugType = window.location.search.indexOf('debug=t') !== -1 ? 'teacher' : window.location.search.indexOf('debug=s') !== -1 ? 'student' : - window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'student' + window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'admin' } window._debugType = debugType; export function initAxiosInterceptors(props) { diff --git a/src/components/ModalFun/index.jsx b/src/components/ModalFun/index.jsx new file mode 100644 index 000000000..d9a62e8fd --- /dev/null +++ b/src/components/ModalFun/index.jsx @@ -0,0 +1,117 @@ +/* eslint-disable react/jsx-no-duplicate-props */ +import React, { useState } from 'react'; +import * as ReactDOM from 'react-dom'; +import { Modal, Button } from 'antd'; +import './index.scss'; + +InitModal.defaultProps = { + okText: '确认', //确定按钮的文字 + cancelText: '取消', //取消按钮的文字 + className: '', // + inputId: 'copyText', //要复制的文本的ID +}; + +// 使用函数调用删除组件 +export default function DelModal(props) { + renderModal({ ...props, type: 'delete' }) +} + +// 使用函数调用选择模态框组件 +export function Confirm(props) { + renderModal({ ...props, type: 'confirm' }) +} + +function renderModal(props) { + const { type, afterClose } = props; + const div = document.createElement('div'); + document.body.appendChild(div); + + function destroy() { + afterClose && afterClose(); + const unmountResult = ReactDOM.unmountComponentAtNode(div); + if (unmountResult && div.parentNode) { + div.parentNode.removeChild(div); + } + } + + function modalType(type) { + if (type === 'delete') { + return + + {props.contentTitle} + } + /> + } else if (type === 'confirm') { + return + } else { + return + } + } + + function render() { + setTimeout(() => { + ReactDOM.render( + modalType(type), + div, + ); + }); + } + render(); +} + +// 选择模态框组件 +function InitModal({ + onCancel, + onOk, + title, + contentTitle, + content, + okText, + cancelText, + afterClose, + className, +}) { + + const [visible, setVisible] = useState(true); + + function onCancelModal() { + setVisible(false); + onCancel && onCancel() + } + + function onSuccess() { + setVisible(false); + onOk && onOk(); + } + + return ( + + {cancelText} + , + , + ]} + > +
+ {contentTitle &&

{contentTitle}

} +

{content}

+
+
+ ) +} diff --git a/src/components/ModalFun/index.scss b/src/components/ModalFun/index.scss new file mode 100644 index 000000000..24f7b0219 --- /dev/null +++ b/src/components/ModalFun/index.scss @@ -0,0 +1,63 @@ +.myself-modal { + .ant-modal-header { + padding: 9px 24px; + background: #f8f8f8; + border-bottom: 1px solid #eee; + } + .ant-modal-title { + text-align: left; + } + .ant-modal-close { + top: 0px !important; + } + .ant-modal-close-x { + font-size: 24px; + } + .ant-modal-body { + text-align: center; + } + .content-title { + display: flex; + justify-content: center; + align-items: center; + margin: 2rem 0 1rem !important; + font-size: 16px; + color: #333; + letter-spacing: 0; + line-height: 29px; + font-weight: 400; + } + .red-circle { + align-self: flex-start; + color: #ca0002; + font-size: 1.5rem !important; + } + .content-descibe { + font-size: 14px; + color: #666; + line-height: 33px; + font-weight: 400; + } + .ant-modal-footer { + padding: 2rem 0; + text-align: center; + border: 0; + .ant-btn { + width: 6rem; + } + } + .foot-submit { + margin-left: 3rem; + color: #df0002; + &:hover { + border-color: #df0002; + } + } + .ant-btn-default:hover, + .ant-btn-default:active, + .ant-btn-default:focus { + background: #f3f4f6; + color: #333; + border-color: #d0d0d0; + } +} \ No newline at end of file diff --git a/src/forge/Component/AddMember.jsx b/src/forge/Component/AddMember.jsx index 62b87cbdf..adbbabdda 100644 --- a/src/forge/Component/AddMember.jsx +++ b/src/forge/Component/AddMember.jsx @@ -92,7 +92,8 @@ function AddMember({getID,login,showNotification}){ onClick={addCollaborator} className="ml15" > - + {/* */} + 添加成员 diff --git a/src/forge/Component/LanguagePower.jsx b/src/forge/Component/LanguagePower.jsx index b2fb174b1..ca7019b3b 100644 --- a/src/forge/Component/LanguagePower.jsx +++ b/src/forge/Component/LanguagePower.jsx @@ -55,7 +55,7 @@ function LanguagePower({owner,projectsId}){ { array && array.map((item,key)=>{ return( - + ) }) } @@ -66,7 +66,7 @@ function LanguagePower({owner,projectsId}){ { array.map((item,key)=>{ return( - {item.name}{item.percent} + {item.name}{item.percent} ) }) } diff --git a/src/forge/Head/NoticeContent.jsx b/src/forge/Head/NoticeContent.jsx index d29dfb72f..666e4a0df 100644 --- a/src/forge/Head/NoticeContent.jsx +++ b/src/forge/Head/NoticeContent.jsx @@ -190,11 +190,11 @@ function NoticeContent({ visible, showNotification, resetUserInfo, current_user: className='hoverNotice-body' // 外部添加className加以区分 onPullRefresh={() => { setNoticePage(noticePage + 1); }} //触发加载ajax的function // type={2} // 传送加载组件的状态 - count={noticeUnreadList.length} // 数据当前的总数量 + count={noticeUnreadList&¬iceUnreadList.length} // 数据当前的总数量 pageSize={10} // > { - noticeUnreadList.map(item => { + Array.isArray(noticeUnreadList)&& noticeUnreadList.map(item => { return (
{ readItem(item) }}>
diff --git a/src/forge/Main/CoderDepot.jsx b/src/forge/Main/CoderDepot.jsx index a4a6d2028..657fbee55 100644 --- a/src/forge/Main/CoderDepot.jsx +++ b/src/forge/Main/CoderDepot.jsx @@ -496,6 +496,7 @@ function CoderDepot(props){ dirInfo.map((item,key)=>{ return( {item.name} : - goToSubRoot(item.path,item.type,item.name)} className={item.type === "submodule" && "submoduleStyle"}> + goToSubRoot(item.path,item.type,item.name)} className={item.type === "submodule" ? "submoduleStyle":''}> {item.name} } diff --git a/src/forge/Main/list.scss b/src/forge/Main/list.scss index 6f07aadb4..fcaba3ac6 100644 --- a/src/forge/Main/list.scss +++ b/src/forge/Main/list.scss @@ -306,6 +306,14 @@ } .files-md{ padding:20px; + h1,h2, h3, h4, h5, h6{ + margin-bottom: .5em !important; + } +} +.readBox{ + h1,h2, h3, h4, h5, h6{ + margin-bottom: .5em !important; + } } /* 详情-代码 */ .branch-wrapper{ diff --git a/src/forge/Main/sub/DetailBanner.jsx b/src/forge/Main/sub/DetailBanner.jsx index 15633f3be..de3008f26 100644 --- a/src/forge/Main/sub/DetailBanner.jsx +++ b/src/forge/Main/sub/DetailBanner.jsx @@ -32,7 +32,7 @@ function DetailBanner({ history,list , owner , projectsId ,showNotification , ur } }).catch(error=>{}) } -console.log("detail:",open_devops); + return(
setVisible(false)} name={projectDetail && projectDetail.name} onSuccess={onSuccess}/> diff --git a/src/forge/Order/Milepost.js b/src/forge/Order/Milepost.js index 3e636332c..de4378408 100644 --- a/src/forge/Order/Milepost.js +++ b/src/forge/Order/Milepost.js @@ -37,7 +37,7 @@ class Milepost extends Component { const url = `/${owner}/${projectsId}/milestones.json`; axios.get(url, { params: { - projectsId, page, limit, status, order_type, order_name + page, limit, status, order_type, order_name } }).then((result) => { if (result) { diff --git a/src/forge/Order/Tags.js b/src/forge/Order/Tags.js index eeff8db28..4082c022a 100644 --- a/src/forge/Order/Tags.js +++ b/src/forge/Order/Tags.js @@ -105,7 +105,6 @@ class Tags extends Component { const url = `/projects/${owner}/${projectsId}/labels.json`; axios.post(url, { ...values, - project_id: projectsId, color: this.state.textcolor }).then(result => { if (result) { diff --git a/src/forge/Order/newMilepost.js b/src/forge/Order/newMilepost.js index f11b9abd7..7b7c184e2 100644 --- a/src/forge/Order/newMilepost.js +++ b/src/forge/Order/newMilepost.js @@ -57,7 +57,6 @@ class NewMilepost extends Component { } axios.post(url, { ...values, - project_id: projectsId, effective_date: time, status: 'open' }).then(result => { diff --git a/src/forge/Server/data.jsx b/src/forge/Server/data.jsx index cb4ec4978..d3385df58 100644 --- a/src/forge/Server/data.jsx +++ b/src/forge/Server/data.jsx @@ -1,55 +1,91 @@ -import React, { useEffect, useState } from 'react'; +import React, { useCallback, useEffect, useState } from 'react'; import DataEmpty from './dataEmpty'; import DetectionModal from './detectionModal'; -import { Table , Spin, message } from 'antd'; +import { Table, Spin, message } from 'antd'; import axios from 'axios'; -function Data(props){ - const [ detectionVisible , setDetectionVisible ] = useState(false); - const [ dataSource , setDataSource ] = useState(undefined); - const [ page , setPage ] = useState(1); - const [ spining , setSpining ] = useState(true); - const [ relayCount , setRelayCount ] = useState(5); - const [ repeatId , setRepeatId ] = useState(undefined); - const [ repeatBranch , setRepeatBranch ] = useState(undefined); +function Data(props) { + const [detectionVisible, setDetectionVisible] = useState(false); + const [dataSource, setDataSource] = useState(undefined); + const [page, setPage] = useState(1); + const [spining, setSpining] = useState(true); + const [relayCount, setRelayCount] = useState(5); + const [repeatId, setRepeatId] = useState(undefined); + const [repeatBranch, setRepeatBranch] = useState(undefined); + const [lookResultUrl, setLookResultUrl] = useState(undefined); + const [openResultTaskId, setOpenResultTaskId] = useState(undefined); + const [viewBase, setViewBase] = useState('https://cjntest.trustie.net/'); - const { owner , projectsId } = props.match.params; - const { current_user , isManager } = props; + const { owner, projectsId } = props.match.params; + const { current_user, isManager } = props; const limit = 15; - function onDetectionOk(){ + function onDetectionOk() { props.showNotification("新建分析成功,可在“检测状态”处查看扫描检测进度"); setDetectionVisible(false); setSpining(true); Init(); } - function Init(){ + function Init() { const url = `/traces/${owner}/${projectsId}/task_results.json`; - axios.get(url,{ - params:{ - page,limit + axios.get(url, { + params: { + page, limit } - }).then(result=>{ - if(result){ - setDataSource(result.data.data); - setRelayCount(result.data.left_tasks_count); + }).then(result => { + if (result) { + + if (Array.isArray(result.data.data)) { + setDataSource(result.data.data); + setRelayCount(result.data.left_tasks_count); + setLookResultUrl(result.data.view_base); + setViewBase(result.data.view_base); + for (const item of result.data.data) { + if (item.detect_status === "detecting" || item.detect_status === "waiting" || (item.detect_status=="detected"&& item.is_reported=="0")) { + setTimeout(Init, 2000); + break; + } + } + } else { + result && result.data.message && props.showNotification(result.data.message); + } + setSpining(false); } - }).catch(error=>{}) + }).catch(error => { }) } - useEffect(()=>{ + useEffect(() => { setSpining(true); Init(); - },[]) + }, []) + + useEffect(() => { + window.addEventListener("message", iframeHeight, false); + return () => { + window.removeEventListener("message", iframeHeight, false); + } + }) + + + function iframeHeight(e){ + console.log('iframeHeight'); + console.log(e.data); + if (e && e.data && viewBase && e.origin && viewBase.indexOf(e.origin)>-1) { + let myHeight = JSON.parse(e.data); + if (document.querySelector("#htmlIframe")) { + document.querySelector("#htmlIframe").height = myHeight.height; + } + } + } // 重新扫描 - function repeatCheck(project_id,branch){ - if(relayCount <= 0){ + function repeatCheck(project_id, branch) { + if (relayCount <= 0) { message.error("无可用检测次数"); return; } @@ -58,8 +94,8 @@ function Data(props){ setDetectionVisible(true); } - function createCheck(){ - if(relayCount <= 0){ + function createCheck() { + if (relayCount <= 0) { message.error("无可用检测次数"); return; } @@ -68,7 +104,7 @@ function Data(props){ setDetectionVisible(true); } - function handleDownExcel(task_id){ + function handleDownExcel(task_id) { setSpining(true); const url = `/api/traces/${owner}/${projectsId}/task_pdf.json?task_id=${task_id}`; // window.open(`/api/traces/${owner}/${projectsId}/task_pdf.json?task_id=${task_id}`); @@ -85,15 +121,35 @@ function Data(props){ setSpining(false); } x.send(); - console.log("spining"); } - return( + function lookResult(taskId) { + if (!openResultTaskId || (openResultTaskId && openResultTaskId !== taskId)) { + setOpenResultTaskId(taskId); + } else { + setOpenResultTaskId(undefined); + } + } + + function iframeLoad() { + try { + let myIframe = document.getElementById("htmlIframe"); + console.log('myIframe', myIframe, myIframe.contentDocument); + if (myIframe.contentDocument) { + console.log(myIframe.contentDocument.querySelector('.el-main')); + myIframe.height = myIframe.contentDocument.querySelector('.el-main').clientHeight + 260; + // myIframe.contentDocument.querySelector('.admin-body-container').style.overflow = 'hidden'; + } + } catch (err) { + console.error(err); + } + } + return (
- setDetectionVisible(false)} - onOk={onDetectionOk} + setDetectionVisible(false)} + onOk={onDetectionOk} owner={owner} projectsId={projectsId} relayCount={relayCount} @@ -102,12 +158,12 @@ function Data(props){ />
重晴鸟代码溯源系统 - { isManager && 新建分析 } + {isManager && 新建分析}
-
+
{ - dataSource && dataSource.length >0 && + dataSource && dataSource.length > 0 &&
  • @@ -115,26 +171,29 @@ function Data(props){ 分支名称 检测状态 检测时间 - { isManager && 操作 } + {isManager && 操作}
  • { - dataSource.map((e,key)=>{ - return( + dataSource.map((e, key) => { + return (
  • - {key + 1 } + {key + 1} {e.branch_tag} { e.detect_status === "fail" ? - 失败 - : e.detect_status==="detecting" ? -
    - - {e.detect_process}% -
    - : - 成功 + 失败 + : e.detect_status === "detecting" ? +
    + + {e.detect_process}% +
    + : e.detect_status === "detected" ? + 成功 :
    + + 0% +
    }
    {e.detect_startdate} @@ -143,28 +202,29 @@ function Data(props){
    { - e.detect_status ==="detecting" ? - 重新扫描 - : - repeatCheck(e.project_id,e.branch_tag)}>重新扫描 + e.detect_status === "detecting" || e.detect_status === "waiting"? + 重新扫描 + : + repeatCheck(e.project_id, e.branch_tag)}>重新扫描 } - {/* { - (e.detect_status ==="fail" || e.detect_status ==="detecting") ? - 查看 - : - 查看 - } */} { - (e.detect_status ==="fail" || e.detect_status ==="detecting") ? - 下载报告 - : - handleDownExcel(e.task_id)}>下载报告 + (e.detect_status === "fail" || e.detect_status === "detecting" || e.detect_status === "waiting" || (e.detect_status=="detected"&& e.is_reported=="0")) ? + 查看 + : + { lookResult(e.task_id) }}>查看 + } + { + (e.detect_status === "fail" || e.detect_status === "detecting" || e.detect_status === "waiting" || (e.detect_status=="detected"&& e.is_reported=="0")) ? + 下载报告 + : + handleDownExcel(e.task_id)}>下载报告 }
    }
  • - {false && } + {/* lookResultUrl+e.task_id */} + {openResultTaskId && openResultTaskId === e.task_id && }
    ) }) diff --git a/src/forge/Server/detectionModal.jsx b/src/forge/Server/detectionModal.jsx index 5e9acef29..b3fbe7b97 100644 --- a/src/forge/Server/detectionModal.jsx +++ b/src/forge/Server/detectionModal.jsx @@ -137,7 +137,7 @@ function DetectionModal({form , visible , onCancel , onOk , projectsId, owner , }
    检测类型 -

    快速-组件级

    +

    深度-文件代码级

    检测参数 diff --git a/src/forge/Settings/CollaboratorMemberByLink.jsx b/src/forge/Settings/CollaboratorMemberByLink.jsx index ea34ec8fd..4d6f9c7bd 100644 --- a/src/forge/Settings/CollaboratorMemberByLink.jsx +++ b/src/forge/Settings/CollaboratorMemberByLink.jsx @@ -58,6 +58,8 @@ function CollaboratorMemberByLink({ projectsId, owner, project_id, author, showN if (document.execCommand('copy')) { document.execCommand('copy'); setCopy(true); + // copyEle.blur(); + document.getSelection().removeAllRanges(); } } @@ -77,13 +79,14 @@ function CollaboratorMemberByLink({ projectsId, owner, project_id, author, showN id="inviteUrl" value={inviteUrl} readOnly - addonAfter={} className='linkBox' + addonAfter={} className='linkBox' />
    -
    注:
    + {/*
    注:
    */}
    1、管理员可通过分享邀请链接的方式,邀请其他成员加入项目
    - 2、若已勾选管理员审核选项,用户接收邀请后管理员可在个人主页中“待办事项”窗口审核成员审核信息,若不需要管理员审核,成员接收邀请后,将直接加入项目 + 2、若已勾选管理员审核选项,用户接收邀请后管理员可在个人主页中“待办事项”窗口审核成员审核信息,若不需要管理员审核,成员接收邀请后,将直接加入项目
    + 3、当前邀请链接有效期为三天
    diff --git a/src/forge/Settings/Setting.js b/src/forge/Settings/Setting.js index e44d9b49a..db6263b6b 100644 --- a/src/forge/Settings/Setting.js +++ b/src/forge/Settings/Setting.js @@ -18,7 +18,7 @@ const menu = [ // {name:"资源库",index:"resources"}, {name:"里程碑",index:"versions"}, {name:"维基 (Wiki)",index:"wiki"}, - // {name:"服务",index:"services"}, + {name:"服务",index:"services"}, {name:"动态",index:"activity"}, ] class Setting extends Component { diff --git a/src/forge/Settings/Webhooks/New.jsx b/src/forge/Settings/Webhooks/New.jsx index 2fee3bf0e..abdf8ce63 100644 --- a/src/forge/Settings/Webhooks/New.jsx +++ b/src/forge/Settings/Webhooks/New.jsx @@ -199,14 +199,14 @@ function New({ form , match , showNotification , history }) { } ] })( - + )} {getFieldDecorator("secret",{ rules:[] })( - + )} diff --git a/src/forge/Settings/new_tags.js b/src/forge/Settings/new_tags.js index ca3eb265e..b39d0ca75 100644 --- a/src/forge/Settings/new_tags.js +++ b/src/forge/Settings/new_tags.js @@ -96,7 +96,6 @@ class NewTags extends Component { axios .post(url, { ...values, - project_id: projectsId, color: this.state.textcolor, }) .then((result) => { diff --git a/src/forge/Settings/setting.scss b/src/forge/Settings/setting.scss index 74d3edf43..b859fd661 100644 --- a/src/forge/Settings/setting.scss +++ b/src/forge/Settings/setting.scss @@ -65,6 +65,15 @@ } .addPanel{ display: flex; + + .icon-tianjiafangda{ + font-size: 16px !important; + font-weight: bold; + &+span{ + position: relative; + top:-1px; + } + } } .red_btn{ display: block; @@ -255,11 +264,15 @@ color:#151d40; } .tipBox{ - background-color:rgba(199, 209, 255, 0.17); + // background-color:rgba(199, 209, 255, 0.17); color:#7e849e; - padding: 20px 150px 20px 25px; + // padding: 20px 150px 20px 25px; display: flex; } + .success{ + background-color: #36cacf; + border-color: #36cacf; + } .linkBox{ width: 55%; .ant-input-group-addon{ diff --git a/src/forge/Wiki/EditWiki.jsx b/src/forge/Wiki/EditWiki.jsx index e605fface..e1be70585 100644 --- a/src/forge/Wiki/EditWiki.jsx +++ b/src/forge/Wiki/EditWiki.jsx @@ -126,7 +126,8 @@ export default Form.create()(({ form, history, showNotification, projectDetail, } function goBack() { - history.push(`/${owner}/${projectsId}/wiki`); + // history.push(`/${owner}/${projectsId}/wiki`); + history.go(-1); } function changeModal(e) { @@ -199,7 +200,7 @@ export default Form.create()(({ form, history, showNotification, projectDetail, mdID={"order-new-description"} initValue={content} onChange={onContentChange} - className="mt20" + className="mt20 wikiMEDEditor" > {getFieldDecorator('content', { rules: [{ required: true, message: "请输入wiki内容" }], diff --git a/src/forge/Wiki/Index.jsx b/src/forge/Wiki/Index.jsx index 1a8b08832..2e91df164 100644 --- a/src/forge/Wiki/Index.jsx +++ b/src/forge/Wiki/Index.jsx @@ -5,6 +5,8 @@ import cookie from 'react-cookies'; import CopyTool from '../Component/CopyTool'; import DelModal from './components/ModalFun'; import Welcome from './Welcome'; +import RenderHtml from "../../components/render-html"; + import { wikiPages, getWiki, deleteWiki } from './api'; import { httpUrl, TokenKey } from './fetch'; import './Index.scss'; @@ -281,7 +283,7 @@ export default (props) => { {permission && }
-
+ {itemDetail&&itemDetail.simple_content&&}
diff --git a/src/forge/Wiki/Index.scss b/src/forge/Wiki/Index.scss index 9be209a28..ac17f9cc9 100644 --- a/src/forge/Wiki/Index.scss +++ b/src/forge/Wiki/Index.scss @@ -382,3 +382,6 @@ body { border-color: #d0d0d0; } } +.wikiMEDEditor .editormd-dialog-footer{ + padding: 0; +} \ No newline at end of file diff --git a/src/glcc/api.js b/src/glcc/api.js index 8c1a13fd6..61a02bab9 100644 --- a/src/glcc/api.js +++ b/src/glcc/api.js @@ -132,4 +132,13 @@ export function auditPassTask(data) { method: 'post', data }); +} + +// 导师审核结果 +export function getPassList(params) { + return fetch({ + url: '/api/studentApply/passList', + method: 'get', + params, + }); } \ No newline at end of file diff --git a/src/glcc/check/index.jsx b/src/glcc/check/index.jsx index 5b66e8036..b0583ec3c 100644 --- a/src/glcc/check/index.jsx +++ b/src/glcc/check/index.jsx @@ -1,5 +1,5 @@ -import React, { Fragment, useEffect, useState } from 'react'; -import { Checkbox, Input, message, Modal, Table, Tooltip, Breadcrumb, Tabs, Button } from 'antd'; +import React, { useEffect, useState } from 'react'; +import { Modal, Table, Tooltip, Breadcrumb, Tabs, Button } from 'antd'; import { Link } from 'react-router-dom'; import moment from 'moment'; import './index.scss'; @@ -23,7 +23,7 @@ function Check({ current_user, showNotification, history }) { const [taskId, setTaskId] = useState(); const [havePass, setHavePass] = useState(false); - const disabledCheck = new Date().getTime() > new Date('2022-07-01').getTime(); + const disabledCheck = new Date().getTime() > new Date('2022-07-01 00:00:00').getTime(); const columns = [ { @@ -31,7 +31,7 @@ function Check({ current_user, showNotification, history }) { className: "taskTableColumns", dataIndex: 'studentName', key: 'studentName', - width: '9%', + width: '12%', ellipsis: true, render: (text, record) => { return ( @@ -104,7 +104,7 @@ function Check({ current_user, showNotification, history }) { dataIndex: 'memo', className: 'taskTableColumns', ellipsis: true, - width: '20%', + width: '18%', render: (text, record) => { return ( @@ -124,15 +124,18 @@ function Check({ current_user, showNotification, history }) { title: '操作', dataIndex: 'passStatus', align: 'center', - width: '9%', + width: '11%', className: "actionColumns taskTableColumns", render: ((text, record, index) => { return (
- { - text ? : - - } + {/* 学生已入选并且锁定 */} + {record.locked && !record.used && } + {/* 学生已经被其他导师锁定 */} + {record.locked && record.used && } + {/* 学生未被锁定 */} + {!record.locked && !record.used && (text ? : + )}
) }) @@ -140,6 +143,9 @@ function Check({ current_user, showNotification, history }) { ]; useEffect(() => { + if(new Date().getTime() > new Date('2022-07-01 0:0').getTime()){ + history.push('/403'); + } if (!current_user.user_id) { history.push('/403'); } @@ -176,16 +182,22 @@ function Check({ current_user, showNotification, history }) { }) } + // 数组元素置顶方法 + function toFirst(data, index){ + if(index != 0){ + data.unshift(data.splice(index,1)[0]); + } + } const customExpandIcon = (props) => { if (props.expanded) { return { props.onExpand(props.record, e); - }}>更多详情 + }}>更多详情 } else { return { props.onExpand(props.record, e); - }}>更多详情 + }}>更多详情 } } @@ -221,6 +233,7 @@ function Check({ current_user, showNotification, history }) {
学生证明 { setVisible(true); setPicture(record.proveAttachmentId) }} src={`${window.location.href.indexOf('test') > -1 || window.location.href.indexOf('localhost') > -1 @@ -257,8 +270,15 @@ function Check({ current_user, showNotification, history }) { } taskId && getStudentList(params).then(res => { if (res.data && Array.isArray(res.data.rows)) { - setData(res.data.rows); - let isPass = res.data.rows.some((item) => { return item.passStatus }); + const data = res.data.rows; + // 已入选数据置顶 + data.map((item, index)=>{ + if(item.locked && !item.used){ + toFirst(data, index); + } + }) + setData(data); + let isPass = res.data.rows.some((item) => { return (item.passStatus && !(item.locked&&item.used)) || (item.locked && !item.used) }); setHavePass(isPass); } setLoading(false); @@ -276,8 +296,9 @@ function Check({ current_user, showNotification, history }) {

审核说明:

1、欢迎进入导师审核页!各位导师可查看到您发布课题的全部学生报名信息
2、您可根据学生报名信息与学生进行邮箱或电话沟通了解学生详细情况,选择满意的学生
-
3、每个课题仅允许审核通过一个学生,在审核过程中,您可以随时调整各学生的审核状态
-
4、请各位导师在7.1日前完成课题申请的审核,7.1日将根据各导师审核信息,公布各课题学生入选名单
+
3、每个课题仅允许审核通过一个学生,在审核过程中,您可以随时调整各学生的审核状态,直到与学生匹配成功
+ {/*
4、6月28日后,各导师可访问 https://www.gitlink.org.cn/glcc/result 查询匹配结果(需使用导师账号登录)
*/} +
4、请各位导师在7月1日前完成课题申请的审核,7月1日凌晨1点平台将根据各导师审核信息,正式公布各课题学生入选名单
{ setTaskId(e) }} activeKey={taskId + ''}> @@ -310,7 +331,6 @@ function Check({ current_user, showNotification, history }) { { setVisible(false) }} onOk={() => { setVisible(false) }} className="picture-modal" @@ -318,6 +338,7 @@ function Check({ current_user, showNotification, history }) { footer={null} > -1 || window.location.href.indexOf('localhost') > -1 ? 'https://testforgeplus.trustie.net' diff --git a/src/glcc/check/index.scss b/src/glcc/check/index.scss index e3dfee7fe..8f12dc295 100644 --- a/src/glcc/check/index.scss +++ b/src/glcc/check/index.scss @@ -178,6 +178,14 @@ } } } + .redColBor .ant-btn-primary[disabled]{ + border-color: #e44141; + span{color: #e44141;} + } + .greenColBor .ant-btn-primary[disabled]{ + border-color: rgb(40, 190, 108); + span{color: rgb(40, 190, 108);} + } } tr:hover .actionColumns .cancelApply { visibility: visible; diff --git a/src/glcc/checkResult/index.jsx b/src/glcc/checkResult/index.jsx new file mode 100644 index 000000000..e6cd4f575 --- /dev/null +++ b/src/glcc/checkResult/index.jsx @@ -0,0 +1,137 @@ +import React, { useEffect, useState } from 'react'; +import { Input, Table, Tooltip } from 'antd'; +import { getPassList, hasAuditRole } from '../api'; +import ProjectDetail from '../project/component/projectDetail'; +// 预公示banner +import resultBanner from "../img/resultBanner.png"; +// 公示banner +import resultBanner2 from "../img/resultBanner2.png"; +import bgPng from "../img/bgPng.png"; +import './index.scss'; +import '../project/index.scss'; +const { Search } = Input; + +// 课题列表 +function CheckResult({current_user, history}) { + // 输入搜索框 + const [keyword, setKeyword] = useState(undefined); + const [data, setData] = useState([]); + // table + const [current, setCurrent] = useState(1); + const [total, setTotal] = useState(0); + const [pageSize, setPageSize] = useState(20); + const [loading, setLoading] = useState(false); + const [expandedRowKeys, setExpandedRowKeys] = useState([]); + const time = new Date().getTime() > new Date('2022-06-28 1:0').getTime() && new Date().getTime() < new Date('2022-07-01 0:0').getTime(); + + useEffect(()=>{ + // 未到时间 + if(new Date().getTime() < new Date('2022-06-28 1:0').getTime()){ + history.push('/glcc'); + } + hasAuditRole({ userId: current_user.user_id }).then(res => { + // 7.1之前 普通用户不可以进入此页面 + if (!(res && res.message == 'success' && res.data.hasRole) && new Date().getTime() < new Date('2022-07-01 12:0').getTime()) { + history.push('/glcc'); + } + }) + },[]) + + useEffect(() => { + setLoading(true); + setExpandedRowKeys([]); + const params = { + curPage: current, + keyword, + pageSize, + } + getPassList(params).then(response => { + if (response && response.message === "success") { + setData(response.data.rows); + setTotal(response.data.total); + } + setLoading(false); + }) + }, [keyword, current, pageSize]) + + const columns = [ + { title: '序号', dataIndex: 'index', align: 'center', className:"columnsResult", width: '6%', render: (text, item, index) => {(current-1)*pageSize+index + 1} }, + { title: '入选学生', dataIndex: 'studentName', className:"columnsResult taskName", width: '10%', ellipsis: true}, + { title: '学生院校', dataIndex: 'school', className:"columnsResult taskName", width: '12%', ellipsis: true,render: (text) => {text}}, + { title: '学生专业', dataIndex: 'profession', className:"columnsResult taskName", width: '12%', ellipsis: true, render: (text) => {text}}, + { title: '课题导师', dataIndex: 'tutorName', className:"columnsResult", width: '10%', ellipsis: true}, + { title: '课题名称', dataIndex: 'taskName', className:"columnsResult", width: '20%', ellipsis: true, render: (text, item) => {window.open(`/glcc/subjects/detail/${item.taskId}`)}}>{text} }, + { title: '项目名称', dataIndex: 'projectName', className:"columnsResult", ellipsis: true, width: '14%', render: (text) => {text} }, + { title: '操作', dataIndex: 'action', align: 'center', className:"columnsResult actionBox"}, + ] + + const customExpandIcon = (props) => { + if (props.expanded) { + return { + props.onExpand(props.record, e); + }}>项目简介 + } else { + return { + props.onExpand(props.record, e); + }}>项目简介 + } + } + + const expandRow = (record) => { + return + } + + // 展开收起行回调 + function onExpand(expanded, record){ + const keys = new Set(expandedRowKeys); + if(expanded){ + keys.add(record.id); + }else{ + keys.delete(record.id); + } + setExpandedRowKeys(Array.from(keys)); + } + + // 改变pagesize + function onShowSizeChange(current, pageSize){ + window.scrollTo(0, 0); + setCurrent(1); + setPageSize(pageSize); + } + + // 切换页数 + function changePage(page, pageSize){ + window.scrollTo(0, 0); + setCurrent(page); + } + + return ( +
+ {time && } + {new Date().getTime() > new Date('2022-07-01 12:0').getTime() && } +
+
+
开源夏令营 / 入选学生名单{time && '预'}公示
+ { setCurrent(1); setKeyword(value) }} /> + + + + + + + ) +} +export default CheckResult; \ No newline at end of file diff --git a/src/glcc/checkResult/index.scss b/src/glcc/checkResult/index.scss new file mode 100644 index 000000000..1824f859a --- /dev/null +++ b/src/glcc/checkResult/index.scss @@ -0,0 +1,88 @@ +.resultListBox{ + background-image:linear-gradient(180deg,#e9f0ff 0%,#dee8ff 51.87%,#f3f4f8 100%); + .bgBox{ + padding-bottom: 115px; + position: relative; + .bgPng3, .bgPng4{ + width: 146px; + position: absolute; + z-index: 0; + top: 210px; + left: 150px; + } + .bgPng4{ + top: 450px; + left: auto; + right: 310px; + } + } + .resultBanner{ + width: 100%; + } + .resultList{ + width: 1200px; + margin: 0 auto; + position: relative; + z-index: 1; + } + .goBackBox{ + padding: 25px 0 8px; + color: #202d40; + font-size: 16px; + border-bottom: 1px dashed #bec5d5; + margin-bottom: 20px; + a{ + color:#a4aabb; + } + } + .search{ + width:509px; + height:48px; + display: block; + margin: 0 auto; + .ant-input-search-button{ + height:48px; + } + } + .resultListTable{ + margin-top: 20px; + background-color:rgba(255, 255, 255, 0.27); + border: 1px solid white; + .ant-table-placeholder{ + background-color: rgba(255, 255, 255, 0.27); + border-bottom: none; + } + th.columnsResult{ + background-color:#DFE8FF; + .ant-table-column-title{ + font-weight:700; + color:#273778; + font-size:16px; + } + &.actionBox .ant-table-column-title{ + visibility: hidden; + } + } + td.columnsResult{ + background-color: #ECF2FF; + border-bottom: 1px dashed #bec5d5; + font-size: 15px; + color:#353f5e; + } + tr:hover td.columnsResult{ + background-color:#fbfbfc; + } + .ant-pagination{ + margin: 26px 20px 0 0; + } + } + .toolTipSpan{ + cursor: default; + &.link{ + color: #2545c9; + cursor: pointer; + &:hover{color:#5d7cff;} + &:active{color: #1140ff;} + } + } +} \ No newline at end of file diff --git a/src/glcc/home/index.jsx b/src/glcc/home/index.jsx index 91e5ac8e0..35c85a917 100644 --- a/src/glcc/home/index.jsx +++ b/src/glcc/home/index.jsx @@ -17,7 +17,7 @@ import { hasAuditRole } from '../api'; import './index.scss'; export default (props) => { - const { current_user, isGlccApplyDate, showNotification, studentApplyStart, history } = props; + const { current_user, isGlccApplyDate, showNotification, studentApplyStart, history, secondStudentApplyDate, isStudentApplyDate } = props; // function goToApply() { // if (isGlccApplyDate) { // if (current_user && current_user.login) { @@ -32,6 +32,8 @@ export default (props) => { // } const [hasRole, setHhasRole] = useState(false); + const resultTime1 = new Date().getTime() > new Date('2022-06-28 1:0').getTime() && new Date().getTime() < new Date('2022-07-01 0:0').getTime(); + const resultTime2 = new Date().getTime() > new Date('2022-07-01 12:0').getTime(); useEffect(() => { if (!current_user.user_id) { @@ -48,7 +50,9 @@ export default (props) => { // 学生报名时间 if (!studentApplyStart) { showNotification("不在报名时间,报名开始时间为5月26日"); - } else { + } else if(!isStudentApplyDate && !secondStudentApplyDate) { + showNotification("课题申请时间已截止"); + } else{ history.push("/glcc/subjects"); } } @@ -57,6 +61,10 @@ export default (props) => { history.push("/glcc/mentoradmin"); } + function goToCheckResult(){ + history.push("/glcc/result"); + } + return (
{/* */} @@ -69,6 +77,14 @@ export default (props) => {
*/} {/* 报名入口 */}
+ {/* 6.28.-7.1 审核结果仅对导师可见,7.1之后对所有用户可见*/} + {resultTime2 &&
+
+ + 名单{resultTime1 ? '预' : ''}公示 +
+
查看各课题入选学生名单
+
} {/* 项目报名 */}
@@ -76,24 +92,25 @@ export default (props) => { 查看项目 {/* 项目报名已截止 */}
-
查看夏令营各项目,掌握项目课题详细信息
+
掌握项目课题详细信息
- {/* 学生报名 */} -
+ {/* 学生报名6.24结束第一次报名,6.29 1:00 - 6.30 24:00第二次报名 */} + {/*
学生报名
-
选择感兴趣的课题,开启您的开源之旅
-
+
选择课题,开启您的开源之旅
+
*/} + {/* 导师审核 */} - {hasRole &&
+ {/* {hasRole && new Date().getTime() < new Date('2022-07-01 0:0').getTime() &&
导师审核
以赛代筛,挖掘高潜力人才
-
} +
} */}
{/* */}
@@ -116,7 +133,7 @@ export default (props) => {
- + diff --git a/src/glcc/home/index.scss b/src/glcc/home/index.scss index 3b70fbd81..2734a0f70 100644 --- a/src/glcc/home/index.scss +++ b/src/glcc/home/index.scss @@ -24,6 +24,7 @@ } .applyBox { + width: 1200px; position: absolute; top: 21vw; left: 17.5vw; @@ -42,7 +43,7 @@ flex-direction: column; justify-content: center; width: 355px; - + height: 118px; &:not(:first-child){ margin-left: 35px; } diff --git a/src/glcc/home/lightspot/index.jsx b/src/glcc/home/lightspot/index.jsx index ca240cdf8..1b52769e1 100644 --- a/src/glcc/home/lightspot/index.jsx +++ b/src/glcc/home/lightspot/index.jsx @@ -12,7 +12,7 @@ import { Link } from 'react-router-dom'; function Lightspot(props) { - const {current_user, isGlccApplyDate, showNotification, studentApplyStart} = props; + const {current_user, isGlccApplyDate, showNotification, goToStudent} = props; function goToApply(){ if(isGlccApplyDate){ @@ -27,15 +27,6 @@ function Lightspot(props) { } } - function goToStudent(){ - // 学生报名时间 - if(!studentApplyStart){ - showNotification("不在报名时间,报名开始时间为5月26日"); - }else{ - window.location.href="/glcc/subjects"; - } - } - return (
diff --git a/src/glcc/img/resultBanner.png b/src/glcc/img/resultBanner.png new file mode 100644 index 000000000..e589b239a Binary files /dev/null and b/src/glcc/img/resultBanner.png differ diff --git a/src/glcc/img/resultBanner2.png b/src/glcc/img/resultBanner2.png new file mode 100644 index 000000000..e3f598e1e Binary files /dev/null and b/src/glcc/img/resultBanner2.png differ diff --git a/src/glcc/index.jsx b/src/glcc/index.jsx index e4e8fc325..f5908e001 100644 --- a/src/glcc/index.jsx +++ b/src/glcc/index.jsx @@ -1,4 +1,4 @@ -import React from "react"; +import React, {useState, useEffect} from "react"; import { Route, Switch } from "react-router-dom"; import { withRouter } from "react-router"; @@ -11,9 +11,8 @@ import "./index.scss"; import Loadable from "react-loadable"; import Loading from "../Loading"; import { ImageLayerOfCommentHOC } from "../modules/page/layers/ImageLayerOfCommentHOC"; -import { useState } from "react"; -import { useEffect } from "react"; import { getStudentApplyInfo } from "./api"; +import { message } from "antd"; // 任务管理审核 @@ -57,22 +56,28 @@ const Openmmlab = Loadable({ loader: () => import("./openmmlab"), loading: Loading, }); - +// 开源夏令营审核结果页面 +const Result = Loadable({ + loader: () => import("./checkResult"), + loading: Loading, +}); const Glcc = (propsF) => { - const {current_user} = propsF; + const {current_user, showLoginDialog} = propsF; // 判断时间是否在开源夏令营报名时间内(4月15日~5月20日) const isGlccApplyDate = Date.parse(new Date()) < 1653062400000; - // 学生报名时间new Date().getTime() > new Date('2022-05-26').getTime() + // 学生报名时间 const studentApplyStart = new Date().getTime() > new Date('2022-05-26').getTime(); - const isStudentApplyDate = new Date().getTime() > new Date('2022-05-26').getTime() && new Date().getTime() < new Date('2022-06-25').getTime(); - const studentApplyEnd = new Date().getTime() > new Date('2022-06-25').getTime(); + const isStudentApplyDate = new Date().getTime() > new Date('2022-05-26').getTime() && new Date().getTime() < new Date('2022-06-25 0:0').getTime(); + const secondStudentApplyDate = new Date().getTime() > new Date('2022-06-29 1:0').getTime() && new Date().getTime() < new Date('2022-06-30 0:0').getTime(); // 用户已报名课题id数组 const [applyTaskId, setApplyTaskId] = useState({}); // 刷新用户课题报名信息 const [studentInfoReset, setStudentInfoReset] = useState(undefined); const [cancelCount,setCancelCount]=useState(0); + // 用户是否已经被导师选中 + const [lockedTaskName, setLockedTaskName] = useState(undefined); useEffect(()=>{ // 获取用户课题报名信息current_user user_id @@ -82,6 +87,7 @@ const Glcc = (propsF) => { const data = {}; response.data && response.data.registrationStudentTaskList.map(item=>{ data[item.taskId] = item.id; + item.locked && setLockedTaskName(item.taskName); }) setApplyTaskId(data); response.data&&setCancelCount(Number(response.data.cancelCount)); @@ -89,6 +95,25 @@ const Glcc = (propsF) => { }) },[studentInfoReset, current_user]) + // 申请课题按钮点击函数 + function applyTask(id){ + // 判断用户是否已经登录 + if(current_user && current_user.login){ + // 判断该学生是否已经被某位导师选中 + if(lockedTaskName){ + message.error(`由于你已入选 ${lockedTaskName} 课题,无法申请其他课题`); + }else if(applyTaskId && Object.keys(applyTaskId).length >= 3){ + // 判断用户是否已经报名三个课题 + message.error('最多只能同时报名三个课题'); + }else{ + // 跳转到学生报名页 + window.location.href=`/glcc/student/apply/${id}`; + } + }else{ + showLoginDialog(); + } + } + return (
@@ -123,14 +148,14 @@ const Glcc = (propsF) => { ( - + )} > {/* 项目/课题列表 */} ( - + )} > @@ -138,7 +163,7 @@ const Glcc = (propsF) => { ( - + )} > @@ -146,7 +171,15 @@ const Glcc = (propsF) => { ( - + + )} + > + + {/* 审核结果页面 */} + ( + )} > @@ -154,7 +187,7 @@ const Glcc = (propsF) => { ( - + )} > diff --git a/src/glcc/openmmlab/projectTab/index.jsx b/src/glcc/openmmlab/projectTab/index.jsx index c707ed8fa..ba493833f 100644 --- a/src/glcc/openmmlab/projectTab/index.jsx +++ b/src/glcc/openmmlab/projectTab/index.jsx @@ -7,7 +7,7 @@ const $ = window.$; const { TabPane } = Tabs; -function ProjectTabs({ list, applyTaskId, history, current_user, showLoginDialog, isStudentApplyDate, studentApplyEnd }) { +function ProjectTabs({ list, applyTaskId, history, current_user, showLoginDialog, isStudentApplyDate, secondStudentApplyDate, applyTask }) { useEffect(()=>{ setTimeout(()=>{ @@ -34,7 +34,7 @@ function ProjectTabs({ list, applyTaskId, history, current_user, showLoginDialog key={i + ''} >
- +
diff --git a/src/glcc/openmmlab/projectTab/projectDetail.jsx b/src/glcc/openmmlab/projectTab/projectDetail.jsx index 206bef698..7178c81d4 100644 --- a/src/glcc/openmmlab/projectTab/projectDetail.jsx +++ b/src/glcc/openmmlab/projectTab/projectDetail.jsx @@ -3,25 +3,9 @@ import { Button, message, Tooltip } from 'antd'; import Nodata from '../../../forge/Nodata'; import { getProjectById } from '../../api'; -export default ({ detail, projectId, applyTaskId, current_user, showLoginDialog, isStudentApplyDate, studentApplyEnd }) => { +export default ({ detail, projectId, applyTaskId, isStudentApplyDate, secondStudentApplyDate, applyTask }) => { const [info, setInfo] = useState(detail); - // 申请课题按钮点击函数 - function applyTask(id){ - // 判断用户是否已经登录 - if(current_user && current_user.login){ - // 判断用户是否已经报名两个课题 - if(applyTaskId && Object.keys(applyTaskId).length >= 2){ - message.error('最多只能同时报名两个课题'); - }else{ - // 跳转到学生报名页 - window.location.href=`/glcc/student/apply/${id}`; - } - }else{ - showLoginDialog(); - } - } - useEffect(()=>{ if(!detail && projectId){ // 通过项目Id查询项目详情 @@ -50,7 +34,16 @@ export default ({ detail, projectId, applyTaskId, current_user, showLoginDialog,
{item.taskDesc}
{item.taskUrl &&
课题链接:   {item.taskUrl}
}
- {(isStudentApplyDate || studentApplyEnd) && (applyTaskId && item.id && Object.keys(applyTaskId).includes(item.id.toString()) ? : isStudentApplyDate && )} + {/* 报名详情按钮 */} + {applyTaskId && Object.keys(applyTaskId).includes(item.id.toString()) && } + + {/* 课题申请时间范围内: 申请课题 */} + {/* 第一次报名 */} + {isStudentApplyDate && !(applyTaskId && Object.keys(applyTaskId).includes(item.id.toString())) && } + {/* 第二次报名 锁定状态 */} + {secondStudentApplyDate && !(applyTaskId && Object.keys(applyTaskId).includes(item.id.toString())) && (item.locked ? : )} + + {/* 查看课题详情按钮 */}
diff --git a/src/glcc/project/component/projectDetail.jsx b/src/glcc/project/component/projectDetail.jsx index f9745a0b7..0963c1270 100644 --- a/src/glcc/project/component/projectDetail.jsx +++ b/src/glcc/project/component/projectDetail.jsx @@ -4,25 +4,9 @@ import Nodata from '../../../forge/Nodata'; import { useEffect } from 'react'; import { getProjectById } from '../../api'; -export default ({ detail, projectId, applyTaskId, current_user, showLoginDialog, isStudentApplyDate, studentApplyEnd }) => { +export default ({ detail, projectId, applyTaskId, isStudentApplyDate, secondStudentApplyDate, showTask=true, applyTask }) => { const [info, setInfo] = useState(detail); - // 申请课题按钮点击函数 - function applyTask(id){ - // 判断用户是否已经登录 - if(current_user && current_user.login){ - // 判断用户是否已经报名两个课题 - if(applyTaskId && Object.keys(applyTaskId).length >= 2){ - message.error('最多只能同时报名两个课题'); - }else{ - // 跳转到学生报名页 - window.location.href=`/glcc/student/apply/${id}`; - } - }else{ - showLoginDialog(); - } - } - useEffect(()=>{ if(!detail && projectId){ // 通过项目Id查询项目详情 @@ -36,13 +20,14 @@ export default ({ detail, projectId, applyTaskId, current_user, showLoginDialog, return ( info ?
-
+
{info.projectName} {info.projectType && {info.projectType}}

GitLink项目地址:  {info.gitlinkUrl}

项目简介:  {info.projectIntro}
- {info.registrationTaskList && info.registrationTaskList.length > 0 ? info.registrationTaskList.map((item, index)=>{ + {/* 从项目、课题列表展开的显示课题列表,结果公示页展开的不显示课题列表 */} + {showTask && (info.registrationTaskList && info.registrationTaskList.length > 0 ? info.registrationTaskList.map((item, index)=>{ return
{window.location.href=`/glcc/subjects/detail/${item.id}`}}>{item.taskName}
@@ -53,13 +38,22 @@ export default ({ detail, projectId, applyTaskId, current_user, showLoginDialog,
{item.taskDesc}
{item.taskUrl &&
课题链接:   {item.taskUrl}
}
- {(isStudentApplyDate || studentApplyEnd) && (applyTaskId && item.id && Object.keys(applyTaskId).includes(item.id.toString()) ? : isStudentApplyDate && )} + {/* 报名详情按钮 */} + {applyTaskId && Object.keys(applyTaskId).includes(item.id.toString()) && } + + {/* 课题申请时间范围内: 申请课题 */} + {/* 第一次报名 */} + {isStudentApplyDate && !(applyTaskId && Object.keys(applyTaskId).includes(item.id.toString())) && } + {/* 第二次报名 锁定状态 */} + {secondStudentApplyDate && !(applyTaskId && Object.keys(applyTaskId).includes(item.id.toString())) && (item.locked ? : )} + + {/* 查看课题详情按钮 */}
¥{item.taskReward}
- }) : } + }) : )}
:
) } \ No newline at end of file diff --git a/src/glcc/project/index.jsx b/src/glcc/project/index.jsx index 9e54f84f5..fab73ba1a 100644 --- a/src/glcc/project/index.jsx +++ b/src/glcc/project/index.jsx @@ -20,7 +20,7 @@ const TaskList = Loadable({ }); function Project(propsF) { - const {location, current_user, showLoginDialog, isStudentApplyDate, studentApplyEnd, applyTaskId, setStudentInfoReset, cancelCount} = propsF; + const {location} = propsF; const {pathname} = location; useEffect(()=>{ window.scrollTo(0, 0); diff --git a/src/glcc/project/index.scss b/src/glcc/project/index.scss index 7bb5ca0fa..8f07e342b 100644 --- a/src/glcc/project/index.scss +++ b/src/glcc/project/index.scss @@ -108,6 +108,10 @@ padding-bottom: 12px; border-bottom: 1px dashed #bec5d5; line-height: 36px; + &.byResult{ + margin: -15px -10px -40px; + border-bottom: none; + } .name{ font-weight:700; color:#3753c5; diff --git a/src/glcc/project/projectList/index.jsx b/src/glcc/project/projectList/index.jsx index b11ee9f0e..e3c6dcf90 100644 --- a/src/glcc/project/projectList/index.jsx +++ b/src/glcc/project/projectList/index.jsx @@ -10,7 +10,7 @@ import star from "../../img/star.png"; const { Search } = Input; // 项目列表 -function ProjectList({ applyTaskId, current_user, showLoginDialog, isStudentApplyDate, studentApplyEnd, location, history, match }) { +function ProjectList({ applyTaskId, isStudentApplyDate, location, match, secondStudentApplyDate, applyTask }) { let gitlinkLastUrl = match.params.gitlinkLastUrl && match.params.gitlinkLastUrl.replace(/\./g, ''); let openmmlab = location.search && location.search.split('=')[1]; // 输入搜索框 @@ -83,18 +83,14 @@ function ProjectList({ applyTaskId, current_user, showLoginDialog, isStudentAppl onVisibleChange={(visible) => { changeVisible(visible, item) }} key={index} placement={(index + 1) % 3 === 0 ? 'bottomRight' : (index + 1) % 3 % 2 === 0 ? 'bottom' : 'bottomLeft'} - content={} + content={} trigger='click' overlayClassName='projectItemPopover' autoAdjustOverflow={false} >
- {!gitlinkLastUrl && !openmmlab && item.recommendFlag ? : ''} + {!gitlinkLastUrl && !openmmlab && item.recommendFlag ? : ''}
diff --git a/src/glcc/project/taskDetail/index.jsx b/src/glcc/project/taskDetail/index.jsx index 39222459f..1dac4ff55 100644 --- a/src/glcc/project/taskDetail/index.jsx +++ b/src/glcc/project/taskDetail/index.jsx @@ -1,14 +1,13 @@ import React, {useEffect, useState } from 'react'; -import { Button, message, Spin} from 'antd'; +import { Button, Spin, Tooltip} from 'antd'; +import { getTaskById } from '../../api'; +import bgPng from "../../img/bgPng.png"; import '../index.scss'; import './index.scss'; -import { getTaskById } from '../../api'; -import banner from "../../img/studentProject.png"; -import bgPng from "../../img/bgPng.png"; // 课题列表 function TaskDetail(props) { - const {match, current_user, showLoginDialog, isStudentApplyDate, studentApplyEnd, applyTaskId} = props + const {match, location, isStudentApplyDate, secondStudentApplyDate, applyTaskId, applyTask} = props const taskId = Number(match.params.taskId); const [detail, setDetail] = useState(undefined); @@ -20,22 +19,6 @@ function TaskDetail(props) { }) },[]) - // 申请课题按钮点击函数 - function applyTask(id){ - // 判断用户是否已经登录 - if(current_user && current_user.login){ - // 判断用户是否已经报名两个课题 - if(applyTaskId && Object.keys(applyTaskId).length >= 2){ - message.error('最多只能同时报名两个课题'); - }else{ - // 跳转到学生报名页 - window.location.href=`/glcc/student/apply/${id}`; - } - }else{ - showLoginDialog(); - } - } - return (
{/* */} @@ -64,7 +47,14 @@ function TaskDetail(props) {
课题简介
{detail.taskDesc}
- {(isStudentApplyDate || studentApplyEnd) && (applyTaskId && taskId && Object.keys(applyTaskId).includes(taskId.toString()) ? : isStudentApplyDate && )} + {/* 报名详情按钮 */} + {applyTaskId && Object.keys(applyTaskId).includes(taskId.toString()) && } + + {/* 课题申请时间范围内: 申请课题 */} + {/* 第一次报名 */} + {isStudentApplyDate && !(applyTaskId && Object.keys(applyTaskId).includes(taskId.toString())) && } + {/* 第二次报名 锁定状态 */} + {secondStudentApplyDate && !(applyTaskId && Object.keys(applyTaskId).includes(taskId.toString())) && (detail.locked ? : )}
diff --git a/src/glcc/project/taskList/index.jsx b/src/glcc/project/taskList/index.jsx index d3b66f994..c38161de6 100644 --- a/src/glcc/project/taskList/index.jsx +++ b/src/glcc/project/taskList/index.jsx @@ -7,7 +7,7 @@ import bgPng from "../../img/bgPng.png"; const { Search } = Input; // 课题列表 -function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDialog, isStudentApplyDate, studentApplyEnd,cancelCount,showNotification}) { +function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDialog, isStudentApplyDate, secondStudentApplyDate,cancelCount,showNotification, applyTask}) { const [visible, setVisible] = useState(false); const [deleteTaskId, setDeleteTaskId] = useState(undefined); // 输入搜索框 @@ -27,16 +27,22 @@ function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDial { title: '课题名称', dataIndex: 'taskName', className:"taskTableColumns taskName", width: '24%', ellipsis: true, render: (text, item) => {window.open(`/glcc/subjects/detail/${item.id}`)}}>{text} }, { title: '课题类型', dataIndex: 'projectType', className:"taskTableColumns", width: '12%', ellipsis: true, }, { title: '项目名称', dataIndex: 'projectName', className:"taskTableColumns", width: '24%', ellipsis: true, render: (text) => {text} }, - { title: '课题奖金', dataIndex: 'taskReward', className:"taskTableColumns", ellipsis: true, width: `${isStudentApplyDate || studentApplyEnd ? '10%' : ''}`, render: (text) => {text} }, + { title: '课题奖金', dataIndex: 'taskReward', className:"taskTableColumns", ellipsis: true, width: '10%', render: (text) => {text} }, { title: '操作', dataIndex: 'action', align: 'center', className:"actionColumns taskTableColumns", render: ((text, item, index) => { return (
- {(isStudentApplyDate || studentApplyEnd) && (applyTaskId && Object.keys(applyTaskId).includes(item.id.toString()) ? - {window.location.href=`/glcc/student/apply/${item.id}`}}>报名详情 - {deleteItem(item.id)}}> - :isStudentApplyDate && - {applyTask(item.id)}}>申请课题)} + {/* 报名详情按钮 */} + {applyTaskId && Object.keys(applyTaskId).includes(item.id.toString()) && {window.location.href=`/glcc/student/apply/${item.id}`}}>报名详情} + + {/* 取消按钮5.26-6.25 */} + {applyTaskId && Object.keys(applyTaskId).includes(item.id.toString()) && isStudentApplyDate && {deleteItem(item.id)}}>} + + {/* 课题申请时间范围内: 申请课题 */} + {/* 第一次报名 */} + {isStudentApplyDate && !(applyTaskId && Object.keys(applyTaskId).includes(item.id.toString())) && {applyTask(item.id)}}>申请课题} + {/* 第二次报名 锁定状态 */} + {secondStudentApplyDate && !(applyTaskId && Object.keys(applyTaskId).includes(item.id.toString())) && (item.locked ? 申请课题 : {applyTask(item.id, item.locked)}}>申请课题)}
) }) @@ -65,7 +71,7 @@ function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDial } const expandRow = (record) => { - return + return } // 展开收起行回调 @@ -79,22 +85,6 @@ function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDial setExpandedRowKeys(Array.from(keys)); } - // 申请课题按钮点击函数 - function applyTask(id){ - // 判断用户是否已经登录 - if(current_user && current_user.login){ - // 判断用户是否已经报名两个课题 - if(applyTaskId && Object.keys(applyTaskId).length >= 2){ - message.error('最多只能同时报名两个课题'); - }else{ - // 跳转到学生报名页 - window.location.href=`/glcc/student/apply/${id}`; - } - }else{ - showLoginDialog(); - } - } - // 取消课题按钮点击函数 function cancelApply(){ const id = []; diff --git a/src/glcc/project/taskList/index.scss b/src/glcc/project/taskList/index.scss index 058caf895..3ee4811cf 100644 --- a/src/glcc/project/taskList/index.scss +++ b/src/glcc/project/taskList/index.scss @@ -38,6 +38,11 @@ color: #466aff; &:hover{color:#5d7cff !important;} &:active{color:#1140ff !important;} + &.disabled .disabled{ + &:hover, &:active{color:#a4aabb !important;} + color:#a4aabb; + cursor: not-allowed; + } } .applyTask, span.applyTask{ color:#eb9350; diff --git a/src/glcc/student/index.jsx b/src/glcc/student/index.jsx index fdb47d7c2..92fc1680a 100644 --- a/src/glcc/student/index.jsx +++ b/src/glcc/student/index.jsx @@ -4,8 +4,9 @@ import { getUploadActionUrl, getUrl, appendFileSizeToUploadFileAll } from 'educo import { locData } from '../../forge/Utils/locData'; import { getStudentApplyInfo, taskList, studentApply, studentApplyEdit } from '../api'; import TextArea from 'antd/lib/input/TextArea'; +import {Confirm} from '../../components/ModalFun'; import { httpUrl } from '../fetch'; -import banner from "../img/banner.png"; +// import banner from "../img/banner.png"; import studentSvg from "../img/student.png"; import './index.scss'; import { Link } from 'react-router-dom'; @@ -28,16 +29,20 @@ function Apply(props) { // 可用于开发时不同账号报名 // current_user && (current_user.user_id = 6) // current_user && (current_user.userName = "创新使者") - const isStudentApplyDate = new Date().getTime() > new Date('2022-05-26').getTime() && new Date().getTime() < new Date('2022-06-25').getTime(); - + const isStudentApplyDate = new Date().getTime() > new Date('2022-06-29 01:00:00').getTime() && new Date().getTime() < new Date('2022-07-01 01:00:00').getTime(); + const studentApplyEnd = new Date().getTime() > new Date('2022-07-01 01:00:00').getTime(); const { getFieldDecorator, validateFields, setFieldsValue, validateFieldsAndScroll } = form; const [imageUrl, setImageUrl] = useState(undefined); const [loading, setLoading] = useState(false); const [reload, setReload] = useState(); + const [locked, setLocked] = useState(true); const [userApplyInfo, setUserApplyInfo] = useState(undefined); const [editable, setEditable] = useState(isStudentApplyDate); const [files, setFiles] = useState([]); const [files1, setFiles1] = useState([]); + const [files2, setFiles2] = useState([]); + // console.log( new Date()); + // console.log('isStudentApplyDate:' + isStudentApplyDate) const initTask = { taskId, memo: '', @@ -102,31 +107,40 @@ function Apply(props) { if (Array.isArray(data.registrationStudentTaskList)) { if (data.registrationStudentTaskList.length) { let initTaskList = []; + let lockedCurrent = false; for (const [i, item] of data.registrationStudentTaskList.entries()) { applyInfo['memo' + i] = item.memo; applyInfo['taskId' + i] = item.taskId; applyInfo['memoAttachmentId' + i] = item.memoAttachmentId; - + if (item.locked && item.passStatus) { + lockedCurrent = item.locked; + } if (i == 0) { item.memoAttachment && setFiles([{ name: item.memoAttachment && item.memoAttachment.fileName || '已上传文件', id: item.memoAttachmentId, uid: item.memoAttachmentId }]); - } else { + } else if(i==1) { item.memoAttachment && setFiles1([{ name: item.memoAttachment && item.memoAttachment.fileName || '已上传文件', id: item.memoAttachmentId, uid: item.memoAttachmentId, }]); + } else { + item.memoAttachment && setFiles2([{ + name: item.memoAttachment && item.memoAttachment.fileName || '已上传文件', + id: item.memoAttachmentId, + uid: item.memoAttachmentId, + }]); } - if(item.enrollFirst){ - applyInfo.enrollFirst=i; - } + // if (item.enrollFirst) { + // applyInfo.enrollFirst = i; + // } - if(item.status==2){ - item.status==2 + if (item.status == 2) { + item.status == 2 } initTaskList.push(item); @@ -139,9 +153,14 @@ function Apply(props) { } setMyTaskList(initTaskList); - // 如果只有一条报名数据,且课题id与当前id不一致,那么新增一条默认数据 - if (data.registrationStudentTaskList.length === 1 && data.registrationStudentTaskList[0].taskId != taskId) { + // let idArr= data.registrationStudentTaskList.map(i=>{return i.id}); + // if(idArr.length===3){lockedCurrent=true;} + // setLocked(lockedCurrent); + // 如果未被锁定,且小于3条报名数据,且课题id与当前id不一致,那么新增一条默认数据 + let taskIdArr=data.registrationStudentTaskList.map(i=>{return i.taskId}); + if (!lockedCurrent && data.registrationStudentTaskList.length < 3 && !taskIdArr.includes(taskId)) { addTask(data.registrationStudentTaskList); + setLocked(false); } } else { // 先增加数据再给选择框赋默认值,否则不生效 @@ -179,56 +198,65 @@ function Apply(props) { // 学生报名夏令营 function handleSubmit(e) { - e.preventDefault(); - validateFieldsAndScroll((err, values) => { - if (!err) { - setLoading(true); - if (myTaskList.length === 2) { - if(values.enrollFirst==1){ - myTaskList[1].enrollFirst = true; - myTaskList[0].enrollFirst = false; - }else{ - myTaskList[1].enrollFirst = false; - myTaskList[0].enrollFirst = true; - } - } - const params = { - grade: values.grade, - location: Array.isArray(values.location) && values.location.join(), - mail: values.mail, - phone: values.phone, - proveAttachmentId: values.proveAttachmentId.file ? values.proveAttachmentId.file.response.id : userApplyInfo.proveAttachmentId, - school: values.school, - profession: values.profession, - studentName: values.studentName, - userId: current_user.user_id, - registrationStudentTaskList: myTaskList - } - if (userApplyInfo) { - params.id = userApplyInfo.id; - studentApplyEdit(params).then(response => { - if (response && response.message === "success") { - showNotification("修改信息成功"); - setStudentInfoReset(Math.random()); - setReload(Math.random()); - setLoading(false); - history.push(`/glcc/subjects`) + e.preventDefault(); + Confirm({ + title:'提示', + content:'提交后将不允许修改报名信息,确认提交?', + onOk:()=>{ + validateFieldsAndScroll((err, values) => { + if (!err) { + setLoading(true); + // if (myTaskList.length === 2) { + // if (values.enrollFirst == 1) { + // myTaskList[1].enrollFirst = true; + // myTaskList[0].enrollFirst = false; + // } else { + // myTaskList[1].enrollFirst = false; + // myTaskList[0].enrollFirst = true; + // } + // } + const params = { + grade: values.grade, + location: Array.isArray(values.location) && values.location.join(), + mail: values.mail, + phone: values.phone, + proveAttachmentId: values.proveAttachmentId.file ? values.proveAttachmentId.file.response.id : userApplyInfo.proveAttachmentId, + school: values.school, + profession: values.profession, + studentName: values.studentName, + userId: current_user.user_id, + registrationStudentTaskList: myTaskList } - }); - } else { - studentApply(params).then(response => { - if (response && response.message === "success") { - showNotification("报名成功"); - setStudentInfoReset(Math.random()); - setReload(Math.random()); - setLoading(false); - history.push(`/glcc/subjects`) + + + if (userApplyInfo) { + params.id = userApplyInfo.id; + studentApplyEdit(params).then(response => { + if (response && response.message === "success") { + showNotification("修改信息成功"); + setStudentInfoReset(Math.random()); + setReload(Math.random()); + setLoading(false); + history.push(`/glcc/subjects`) + } + }); + } else { + studentApply(params).then(response => { + if (response && response.message === "success") { + showNotification("报名成功"); + setStudentInfoReset(Math.random()); + setReload(Math.random()); + setLoading(false); + history.push(`/glcc/subjects`) + } + }); } - }); - } + } + }); } }); + }; const helper = useCallback( @@ -293,8 +321,10 @@ function Apply(props) { changeTaskItem('memoAttachmentId', '', i); } console.log(info.fileList); - if (i) { + if (i==1) { setFiles1(appendFileSizeToUploadFileAll(info.fileList).slice(-1)); + }else if (i==2) { + setFiles2(appendFileSizeToUploadFileAll(info.fileList).slice(-1)); } else { setFiles(appendFileSizeToUploadFileAll(info.fileList).slice(-1)); } @@ -315,46 +345,47 @@ function Apply(props) { let taskListNew = List ? [...List] : [...myTaskList]; if (taskId != taskListNew[0].taskId) { taskListNew.push(initTask); + let newTask = 'taskId' + (taskListNew.length - 1); // 先增加数据再给选择框赋默认值,否则不生效 new Promise((resove) => { setMyTaskList(() => { resove(); return taskListNew }); - }).then(res => setFieldsValue({ 'taskId1': taskId })) + }).then(res => setFieldsValue({ [newTask]: taskId })) } else { taskListNew.push({ ...initTask, taskId: '' }); setMyTaskList(taskListNew); } } - function deleteTask(i) { - let taskListNew = myTaskList.slice(); - let reWriteInfo; - if (i) { - reWriteInfo = { - taskId1: '', - memo1: '', - memoAttachmentId1: '' - } - setFiles1([]); - } else { - reWriteInfo = { - taskId0: taskListNew[1].taskId, - memo0: taskListNew[1].memo, - memoAttachmentId0: taskListNew[1].memoAttachmentId, - taskId1: '', - memo1: '', - memoAttachmentId1: '' - } - setFiles(files1); - setFiles1([]); - } + // function deleteTask(i) { + // let taskListNew = myTaskList.slice(); + // let reWriteInfo; + // if (i) { + // reWriteInfo = { + // taskId1: '', + // memo1: '', + // memoAttachmentId1: '' + // } + // setFiles1([]); + // } else { + // reWriteInfo = { + // taskId0: taskListNew[1].taskId, + // memo0: taskListNew[1].memo, + // memoAttachmentId0: taskListNew[1].memoAttachmentId, + // taskId1: '', + // memo1: '', + // memoAttachmentId1: '' + // } + // setFiles(files1); + // setFiles1([]); + // } - taskListNew.splice(i, 1); - setMyTaskList(taskListNew); - setFieldsValue(reWriteInfo); - } + // taskListNew.splice(i, 1); + // setMyTaskList(taskListNew); + // setFieldsValue(reWriteInfo); + // } function changeTaskItem(field, val, i) { let taskListNew = [...myTaskList]; @@ -390,38 +421,39 @@ function Apply(props) {
申请课题

基本信息

+ {/* className={editable ? "" : "disabledInput"} disabled={editable ?false : true} */} {helper('学生姓名', '', 'studentName', [{ required: true, message: "请正确输入学生姓名" }, { max: 32, message: '超出限制长度32位字符,请重新编辑' }], - { verify("studentName") }} className={editable ? "" : "disabledInput"} disabled={editable ? false : true} /> + { verify("studentName") }} className={"disabledInput"} disabled /> )} {helper('所在高校', '', 'school', [{ required: true, message: "请正确输入所在高校" }, { max: 32, message: '超出限制长度32位字符,请重新编辑' }], - { verify("school") }} className={editable ? "" : "disabledInput"} disabled={editable ? false : true} /> + { verify("school") }} className={"disabledInput"} disabled /> )} {helper('所学专业', '', 'profession', [{ max: 32, message: '超出限制长度32位字符,请重新编辑' }], - { verify("profession") }} className={editable ? "" : "disabledInput"} disabled={editable ? false : true} /> + { verify("profession") }} className={"disabledInput"} disabled /> )} {getFieldDecorator("location", { rules: [] })( - + )} {helper('所在年级', '', 'grade', [], - {gradeList.map(item => { return })} )} @@ -431,7 +463,7 @@ function Apply(props) { [{ required: true, message: "请正确输入联系电话" }, { max: 14, message: '超出限制长度14位字符,请重新编辑' }, { pattern: /(^(\d{3,4}-)?\d{7,8})$|([1][3,4,5,6,7,8,9][0-9]{9})/, message: '请正确输入联系电话' }], - { verify("phone") }} className={editable ? "" : "disabledInput"} disabled={editable ? false : true} /> + { verify("phone") }} className={"disabledInput"} disabled /> )} {helper('邮箱地址', '', @@ -441,7 +473,7 @@ function Apply(props) { { required: true, message: "请输入邮箱地址" }, { max: 50, message: '超出限制长度50位字符,请重新编辑' }, ], - { verify("mail") }} className={editable ? "" : "disabledInput"} disabled={editable ? false : true} /> + { verify("mail") }} className={"disabledInput"} disabled /> )}
{helper('学生证明', @@ -456,6 +488,7 @@ function Apply(props) { accept=".png,.jpg,.jpeg" beforeUpload={beforeUpload} onChange={handleChange} + disabled > {imageUrl ? avatar : userApplyInfo && userApplyInfo.proveAttachmentId ?
:
@@ -469,12 +502,12 @@ function Apply(props) { myTaskList.map((item, i) => { return ( -

课题信息({i + 1}/2) +

课题信息({i + 1}) {/* {myTaskList.length > 1 && { deleteTask(i) }}>删除} */}

{item.status == 1 && item.auditRemark &&
欢迎您报名CCF GitLink开源编程夏令营,感谢您对GLCC项目及课题的关注和支持!本次您的报名信息未通过初审,原因如下:
-
+
希望您尽快修改并重新提交报名信息,我们将再次审核,万分感谢!
} {helper('课题名称', @@ -494,6 +527,7 @@ function Apply(props) { {allTaskList.map(item => { return })} )} + {item.locked && item.passStatus &&
您已通过审核,成功入选该课题
}
{helper('自荐书', , 'memo' + i, @@ -506,7 +540,10 @@ function Apply(props) { 4、课题实施规划:课题实施拆解、工作规划以及时间安排; 5、个人简介:编程技能、过往经验; 6、提示:文本框表达内容有限,建议您提供内容的pdf或url链接方式展示更精彩的陈述" - onBlur={(e) => { verify("memo" + i); changeTaskItem("memo", e.currentTarget.value, i) }} rows={7} className={editable ? "memoText" : "memoText disabledInput"} /> + onBlur={(e) => { verify("memo" + i); changeTaskItem("memo", e.currentTarget.value, i) }} + rows={7} + className={!(isStudentApplyDate && !item.id) ? "memoText disabledInput" : "memoText"} + disabled={!(isStudentApplyDate && !item.id)} /> )}
{helper('附件', @@ -516,7 +553,7 @@ function Apply(props) { { bookChange(info, i) }} onDownload={download} beforeUpload={beforeUpload2} @@ -525,8 +562,9 @@ function Apply(props) { downloadIcon: , showRemoveIcon: true }} + disabled={!(isStudentApplyDate && !item.id)} > -
上传自荐书
+
上传自荐书
)}
@@ -539,23 +577,24 @@ function Apply(props) { } { - myTaskList.length === 2 && 对您而言,哪个课题的优先级更高?注:优先级将决定您申请课题的入选顺序,若申请的2个课题同时通过审核,将以高优先级的课题作为入选标准} - > - {getFieldDecorator("enrollFirst", { - rules: [{ required: true, message: "请选择课题优先级" },] - })( - - 课题一 - 课题二 - - )} - + // myTaskList.length >= 2 && 对您而言,哪个课题的优先级更高?注:优先级将决定您申请课题的入选顺序,若申请的2个课题同时通过审核,将以高优先级的课题作为入选标准} + // > + // {getFieldDecorator("enrollFirst", { + // rules: [{ required: true, message: "请选择课题优先级" },] + // })( + // + // 课题一 + // 课题二 + // 课题三 + // + // )} + // } - - - + {!studentApplyEnd && + + }
diff --git a/src/glcc/student/index.scss b/src/glcc/student/index.scss index 41fa70c0b..8724fa2f3 100644 --- a/src/glcc/student/index.scss +++ b/src/glcc/student/index.scss @@ -12,18 +12,6 @@ .has-error .ant-form-split { position: absolute; } - .ant-btn-primary { - background-color: #466aff; - border-color: #466aff; - &:hover { - background-color: #5d7cff; - border-color: #5d7cff; - } - &:active { - background-color: #1140ff; - border-color: #1140ff; - } - } .apply { width: 1200px; margin: 0 auto; @@ -196,16 +184,6 @@ .sub { width: 200px; height: 36px; - background-color: #466aff; - border-color: #466aff; - &:hover { - background-color: #5d7cff; - border-color: #5d7cff; - } - &:active { - background-color: #1140ff; - border-color: #1140ff; - } } } .explain { @@ -249,12 +227,19 @@ font-size: 14px; line-height: 30px; text-align: center; + // cursor: not-allowed; cursor: pointer; &:hover { opacity: 0.8; } } + .ant-upload-disabled { + .glcc_btn { + cursor: not-allowed; + } + } + .add_task { margin-left: 90px; } @@ -317,6 +302,25 @@ background-color: #466aff; } } + + .task-checked { + display: inline-block; + width: 287px; + height: 32px; + margin-left: 32px; + background-color: rgba(0, 223, 185, 0.1); + border: 1px solid #00be4c; + border-radius: 4px; + color: #00be4c; + font-size: 16px; + font-weight: 500; + line-height: 28px; + margin-top: 4px; + + .iconfont { + margin: 0 9px 0 18px; + } + } } .reject-reason { width: 100%; @@ -326,12 +330,12 @@ border: 1px solid #df4c4c; color: #595e82; font-size: 15px; - padding-left:22px; + padding-left: 22px; margin-bottom: 30px; - .icon-shanchudiao{ + .icon-shanchudiao { position: relative; - top:1px; + top: 1px; color: #e21b1b; margin-right: 5px; font-weight: 600; diff --git a/src/modules/loginRegister/Register.jsx b/src/modules/loginRegister/Register.jsx index 1ff6d9e19..32d853585 100644 --- a/src/modules/loginRegister/Register.jsx +++ b/src/modules/loginRegister/Register.jsx @@ -79,7 +79,7 @@ function Register(props){ }).then(response => { if (response.data.status === -1) { setGetCaptchaBut(false); - callback('该邮箱已被注册'); + callback(response.data.message); } else { setEmailStr(value); setGetCaptchaBut(true);