杨树明 5 years ago
commit 63c9f3f79d

@ -9,7 +9,7 @@ const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin');
const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin'); const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin');
const eslintFormatter = require('react-dev-utils/eslintFormatter'); const eslintFormatter = require('react-dev-utils/eslintFormatter');
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin'); const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
// const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin'); const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
const getClientEnvironment = require('./env'); const getClientEnvironment = require('./env');
const paths = require('./paths'); const paths = require('./paths');
@ -29,7 +29,7 @@ const env = getClientEnvironment(publicUrl);
module.exports = { module.exports = {
// You may want 'eval' instead if you prefer to see the compiled output in DevTools. // You may want 'eval' instead if you prefer to see the compiled output in DevTools.
// See the discussion in https://github.com/facebookincubator/create-react-app/issues/343.s // See the discussion in https://github.com/facebookincubator/create-react-app/issues/343.s
// devtool: "source-map", // 开启调试 devtool: "source-map", // 开启调试
// These are the "entry points" to our application. // These are the "entry points" to our application.
// This means they will be the "root" imports that are included in JS bundle. // This means they will be the "root" imports that are included in JS bundle.
// The first two entry points enable "hot" CSS and auto-refreshes for JS. // The first two entry points enable "hot" CSS and auto-refreshes for JS.
@ -249,6 +249,7 @@ module.exports = {
// https://github.com/jmblog/how-to-optimize-momentjs-with-webpack // https://github.com/jmblog/how-to-optimize-momentjs-with-webpack
// You can remove this if you don't use Moment.js: // You can remove this if you don't use Moment.js:
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/), new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
new MonacoWebpackPlugin(),
], ],
// Some libraries import Node modules but don't use them in the browser. // Some libraries import Node modules but don't use them in the browser.
// Tell Webpack to provide empty mocks for them so importing them works. // Tell Webpack to provide empty mocks for them so importing them works.

@ -116,7 +116,7 @@
}, },
"@types/anymatch": { "@types/anymatch": {
"version": "1.3.1", "version": "1.3.1",
"resolved": "http://registry.npm.taobao.org/@types/anymatch/download/@types/anymatch-1.3.1.tgz", "resolved": "https://registry.npm.taobao.org/@types/anymatch/download/@types/anymatch-1.3.1.tgz?cache=0&sync_timestamp=1563089138491&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fanymatch%2Fdownload%2F%40types%2Fanymatch-1.3.1.tgz",
"integrity": "sha1-M2utwb7sudrMOL6izzKt9ieoQho=" "integrity": "sha1-M2utwb7sudrMOL6izzKt9ieoQho="
}, },
"@types/jss": { "@types/jss": {
@ -129,9 +129,9 @@
} }
}, },
"@types/node": { "@types/node": {
"version": "11.13.4", "version": "12.6.3",
"resolved": "http://registry.npm.taobao.org/@types/node/download/@types/node-11.13.4.tgz", "resolved": "https://registry.npm.taobao.org/@types/node/download/@types/node-12.6.3.tgz",
"integrity": "sha1-+D7Dw+BbF0tyQfretmiCZ/5bIso=" "integrity": "sha1-RNUHxWNPhecWRwfKNruiG1IT1Ic="
}, },
"@types/prop-types": { "@types/prop-types": {
"version": "15.7.0", "version": "15.7.0",
@ -165,21 +165,21 @@
}, },
"@types/tapable": { "@types/tapable": {
"version": "1.0.4", "version": "1.0.4",
"resolved": "http://registry.npm.taobao.org/@types/tapable/download/@types/tapable-1.0.4.tgz", "resolved": "https://registry.npm.taobao.org/@types/tapable/download/@types/tapable-1.0.4.tgz",
"integrity": "sha1-tP/H3Je0mMlps2CkHu4kf4JhY3A=" "integrity": "sha1-tP/H3Je0mMlps2CkHu4kf4JhY3A="
}, },
"@types/uglify-js": { "@types/uglify-js": {
"version": "3.0.4", "version": "3.0.4",
"resolved": "http://registry.npm.taobao.org/@types/uglify-js/download/@types/uglify-js-3.0.4.tgz", "resolved": "https://registry.npm.taobao.org/@types/uglify-js/download/@types/uglify-js-3.0.4.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fuglify-js%2Fdownload%2F%40types%2Fuglify-js-3.0.4.tgz",
"integrity": "sha1-lr6uI99vVhhiqDC0KIpJ6GuqwII=", "integrity": "sha1-lr6uI99vVhhiqDC0KIpJ6GuqwII=",
"requires": { "requires": {
"source-map": "^0.6.1" "source-map": "^0.6.1"
} }
}, },
"@types/webpack": { "@types/webpack": {
"version": "4.4.27", "version": "4.4.35",
"resolved": "http://registry.npm.taobao.org/@types/webpack/download/@types/webpack-4.4.27.tgz", "resolved": "https://registry.npm.taobao.org/@types/webpack/download/@types/webpack-4.4.35.tgz",
"integrity": "sha1-i7lCkYWXems7nm5hMvVhBmqn58I=", "integrity": "sha1-twiOstRx1WReVQPScng8r6dTWDs=",
"requires": { "requires": {
"@types/anymatch": "*", "@types/anymatch": "*",
"@types/node": "*", "@types/node": "*",
@ -271,15 +271,6 @@
"resolved": "http://registry.npm.taobao.org/address/download/address-1.0.3.tgz", "resolved": "http://registry.npm.taobao.org/address/download/address-1.0.3.tgz",
"integrity": "sha1-tfUGMfjWzsi9IMljljr7VeBsvOk=" "integrity": "sha1-tfUGMfjWzsi9IMljljr7VeBsvOk="
}, },
"aes-decrypter": {
"version": "1.0.3",
"resolved": "http://registry.npm.taobao.org/aes-decrypter/download/aes-decrypter-1.0.3.tgz",
"integrity": "sha1-nAa4pUNaWtCduTP4oBSvzxhMw04=",
"dev": true,
"requires": {
"pkcs7": "^0.2.3"
}
},
"ajv": { "ajv": {
"version": "5.5.2", "version": "5.5.2",
"resolved": "http://registry.npm.taobao.org/ajv/download/ajv-5.5.2.tgz", "resolved": "http://registry.npm.taobao.org/ajv/download/ajv-5.5.2.tgz",
@ -351,7 +342,7 @@
} }
}, },
"antd": { "antd": {
"version": "3.6.5", "version": "3.16.2",
"resolved": "http://registry.npm.taobao.org/antd/download/antd-3.16.2.tgz", "resolved": "http://registry.npm.taobao.org/antd/download/antd-3.16.2.tgz",
"integrity": "sha1-o7SoRKbegubIfJb4jdojF/TYkHU=", "integrity": "sha1-o7SoRKbegubIfJb4jdojF/TYkHU=",
"requires": { "requires": {
@ -3786,12 +3777,6 @@
"next-tick": "^1.0.0" "next-tick": "^1.0.0"
} }
}, },
"es5-shim": {
"version": "4.5.13",
"resolved": "http://registry.npm.taobao.org/es5-shim/download/es5-shim-4.5.13.tgz",
"integrity": "sha1-XYgGLeBJ+Jafg3g/SkiEOV8h0os=",
"dev": true
},
"es6-iterator": { "es6-iterator": {
"version": "2.0.3", "version": "2.0.3",
"resolved": "http://registry.npm.taobao.org/es6-iterator/download/es6-iterator-2.0.3.tgz", "resolved": "http://registry.npm.taobao.org/es6-iterator/download/es6-iterator-2.0.3.tgz",
@ -4626,15 +4611,6 @@
"debug": "^3.2.6" "debug": "^3.2.6"
} }
}, },
"for-each": {
"version": "0.3.3",
"resolved": "http://registry.npm.taobao.org/for-each/download/for-each-0.3.3.tgz",
"integrity": "sha1-abRH6IoKXTLD5whPPxcQA0shN24=",
"dev": true,
"requires": {
"is-callable": "^1.1.3"
}
},
"for-in": { "for-in": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "http://registry.npm.taobao.org/for-in/download/for-in-1.0.2.tgz", "resolved": "http://registry.npm.taobao.org/for-in/download/for-in-1.0.2.tgz",
@ -5850,12 +5826,6 @@
"resolved": "http://registry.npm.taobao.org/indexof/download/indexof-0.0.1.tgz", "resolved": "http://registry.npm.taobao.org/indexof/download/indexof-0.0.1.tgz",
"integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=" "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10="
}, },
"individual": {
"version": "2.0.0",
"resolved": "http://registry.npm.taobao.org/individual/download/individual-2.0.0.tgz",
"integrity": "sha1-gzsJfa0jKU52EXqY+zjg2a1hu5c=",
"dev": true
},
"inflight": { "inflight": {
"version": "1.0.6", "version": "1.0.6",
"resolved": "http://registry.npm.taobao.org/inflight/download/inflight-1.0.6.tgz", "resolved": "http://registry.npm.taobao.org/inflight/download/inflight-1.0.6.tgz",
@ -7186,12 +7156,6 @@
"yallist": "^2.1.2" "yallist": "^2.1.2"
} }
}, },
"m3u8-parser": {
"version": "2.1.0",
"resolved": "http://registry.npm.taobao.org/m3u8-parser/download/m3u8-parser-2.1.0.tgz",
"integrity": "sha1-yBcDKewc1RXQ1Yu4t2LamJbLA2g=",
"dev": true
},
"make-dir": { "make-dir": {
"version": "1.3.0", "version": "1.3.0",
"resolved": "http://registry.npm.taobao.org/make-dir/download/make-dir-1.3.0.tgz", "resolved": "http://registry.npm.taobao.org/make-dir/download/make-dir-1.3.0.tgz",
@ -7547,12 +7511,6 @@
"resolved": "http://registry.npm.taobao.org/mute-stream/download/mute-stream-0.0.7.tgz", "resolved": "http://registry.npm.taobao.org/mute-stream/download/mute-stream-0.0.7.tgz",
"integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=" "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s="
}, },
"mux.js": {
"version": "4.3.2",
"resolved": "http://registry.npm.taobao.org/mux.js/download/mux.js-4.3.2.tgz",
"integrity": "sha1-V21TffA33F7DXsExa5SNgV01whA=",
"dev": true
},
"nan": { "nan": {
"version": "2.13.2", "version": "2.13.2",
"resolved": "http://registry.npm.taobao.org/nan/download/nan-2.13.2.tgz", "resolved": "http://registry.npm.taobao.org/nan/download/nan-2.13.2.tgz",
@ -8040,16 +7998,6 @@
"is-glob": "^2.0.0" "is-glob": "^2.0.0"
} }
}, },
"parse-headers": {
"version": "2.0.2",
"resolved": "http://registry.npm.taobao.org/parse-headers/download/parse-headers-2.0.2.tgz",
"integrity": "sha1-lUXopMGuXq6n0kmSvKiQKB7SbjQ=",
"dev": true,
"requires": {
"for-each": "^0.3.3",
"string.prototype.trim": "^1.1.2"
}
},
"parse-json": { "parse-json": {
"version": "2.2.0", "version": "2.2.0",
"resolved": "http://registry.npm.taobao.org/parse-json/download/parse-json-2.2.0.tgz", "resolved": "http://registry.npm.taobao.org/parse-json/download/parse-json-2.2.0.tgz",
@ -8173,12 +8121,6 @@
"pinkie": "^2.0.0" "pinkie": "^2.0.0"
} }
}, },
"pkcs7": {
"version": "0.2.3",
"resolved": "http://registry.npm.taobao.org/pkcs7/download/pkcs7-0.2.3.tgz",
"integrity": "sha1-ItYGZtAQZcXyRDkJjkpIMEUic74=",
"dev": true
},
"pkg-dir": { "pkg-dir": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "http://registry.npm.taobao.org/pkg-dir/download/pkg-dir-2.0.0.tgz", "resolved": "http://registry.npm.taobao.org/pkg-dir/download/pkg-dir-2.0.0.tgz",
@ -10181,17 +10123,6 @@
} }
} }
}, },
"react": {
"version": "^16.3.0",
"resolved": "http://registry.npm.taobao.org/react/download/react-16.8.6.tgz",
"integrity": "sha1-rWw6lhT9Ok6e9REX9U2IjaAfK74=",
"requires": {
"loose-envify": "^1.1.0",
"object-assign": "^4.1.1",
"prop-types": "^15.6.2",
"scheduler": "^0.13.6"
}
},
"react-beautiful-dnd": { "react-beautiful-dnd": {
"version": "10.1.1", "version": "10.1.1",
"resolved": "http://registry.npm.taobao.org/react-beautiful-dnd/download/react-beautiful-dnd-10.1.1.tgz", "resolved": "http://registry.npm.taobao.org/react-beautiful-dnd/download/react-beautiful-dnd-10.1.1.tgz",
@ -11221,15 +11152,6 @@
"is-promise": "^2.1.0" "is-promise": "^2.1.0"
} }
}, },
"rust-result": {
"version": "1.0.0",
"resolved": "http://registry.npm.taobao.org/rust-result/download/rust-result-1.0.0.tgz",
"integrity": "sha1-NMdbLm3Dn+WHXlveyFteD5FTb3I=",
"dev": true,
"requires": {
"individual": "^2.0.0"
}
},
"rx-lite": { "rx-lite": {
"version": "4.0.8", "version": "4.0.8",
"resolved": "http://registry.npm.taobao.org/rx-lite/download/rx-lite-4.0.8.tgz", "resolved": "http://registry.npm.taobao.org/rx-lite/download/rx-lite-4.0.8.tgz",
@ -11248,15 +11170,6 @@
"resolved": "http://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.1.2.tgz", "resolved": "http://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.1.2.tgz",
"integrity": "sha1-mR7GnSluAxN0fVm9/St0XDX4go0=" "integrity": "sha1-mR7GnSluAxN0fVm9/St0XDX4go0="
}, },
"safe-json-parse": {
"version": "4.0.0",
"resolved": "http://registry.npm.taobao.org/safe-json-parse/download/safe-json-parse-4.0.0.tgz",
"integrity": "sha1-fA9XjPzNEtM6ccDgVBPi7KFx6qw=",
"dev": true,
"requires": {
"rust-result": "^1.0.0"
}
},
"safe-regex": { "safe-regex": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "http://registry.npm.taobao.org/safe-regex/download/safe-regex-1.1.0.tgz", "resolved": "http://registry.npm.taobao.org/safe-regex/download/safe-regex-1.1.0.tgz",
@ -12058,17 +11971,6 @@
} }
} }
}, },
"string.prototype.trim": {
"version": "1.1.2",
"resolved": "http://registry.npm.taobao.org/string.prototype.trim/download/string.prototype.trim-1.1.2.tgz",
"integrity": "sha1-0E3iyJ4Tf019IG8Ia17S+ua+jOo=",
"dev": true,
"requires": {
"define-properties": "^1.1.2",
"es-abstract": "^1.5.0",
"function-bind": "^1.0.2"
}
},
"string_decoder": { "string_decoder": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "http://registry.npm.taobao.org/string_decoder/download/string_decoder-1.1.1.tgz", "resolved": "http://registry.npm.taobao.org/string_decoder/download/string_decoder-1.1.1.tgz",
@ -12452,12 +12354,6 @@
"integrity": "sha1-8shUBoALmw90yfdGW4HqrSQSUvg=", "integrity": "sha1-8shUBoALmw90yfdGW4HqrSQSUvg=",
"dev": true "dev": true
}, },
"tsml": {
"version": "1.0.1",
"resolved": "http://registry.npm.taobao.org/tsml/download/tsml-1.0.1.tgz",
"integrity": "sha1-ifghi52eJX9H1/a1bQHFpNLGj8M=",
"dev": true
},
"tty-browserify": { "tty-browserify": {
"version": "0.0.0", "version": "0.0.0",
"resolved": "http://registry.npm.taobao.org/tty-browserify/download/tty-browserify-0.0.0.tgz", "resolved": "http://registry.npm.taobao.org/tty-browserify/download/tty-browserify-0.0.0.tgz",
@ -12789,12 +12685,6 @@
"prepend-http": "^1.0.1" "prepend-http": "^1.0.1"
} }
}, },
"url-toolkit": {
"version": "2.1.6",
"resolved": "http://registry.npm.taobao.org/url-toolkit/download/url-toolkit-2.1.6.tgz",
"integrity": "sha1-bQMkZJnlGarSJMRARKSuIFRBVPI=",
"dev": true
},
"use": { "use": {
"version": "3.1.1", "version": "3.1.1",
"resolved": "http://registry.npm.taobao.org/use/download/use-3.1.1.tgz", "resolved": "http://registry.npm.taobao.org/use/download/use-3.1.1.tgz",
@ -12862,87 +12752,6 @@
"extsprintf": "^1.2.0" "extsprintf": "^1.2.0"
} }
}, },
"video.js": {
"version": "6.13.0",
"resolved": "http://registry.npm.taobao.org/video.js/download/video.js-6.13.0.tgz",
"integrity": "sha1-+Uh9RjJzQPpI7NUTcqKYHbts3kw=",
"dev": true,
"requires": {
"babel-runtime": "^6.9.2",
"global": "4.3.2",
"safe-json-parse": "4.0.0",
"tsml": "1.0.1",
"videojs-font": "2.1.0",
"videojs-ie8": "1.1.2",
"videojs-vtt.js": "0.12.6",
"xhr": "2.4.0"
}
},
"videojs-contrib-hls": {
"version": "5.15.0",
"resolved": "http://registry.npm.taobao.org/videojs-contrib-hls/download/videojs-contrib-hls-5.15.0.tgz",
"integrity": "sha1-/klXNn5daLfSP3jtMuN6ndiSoKg=",
"dev": true,
"requires": {
"aes-decrypter": "1.0.3",
"global": "^4.3.0",
"m3u8-parser": "2.1.0",
"mux.js": "4.3.2",
"url-toolkit": "^2.1.3",
"video.js": "^5.19.1 || ^6.2.0",
"videojs-contrib-media-sources": "4.7.2",
"webwackify": "0.1.6"
}
},
"videojs-contrib-media-sources": {
"version": "4.7.2",
"resolved": "http://registry.npm.taobao.org/videojs-contrib-media-sources/download/videojs-contrib-media-sources-4.7.2.tgz",
"integrity": "sha1-Ct+SkQfVt0zyyKuygkyCF35DhY4=",
"dev": true,
"requires": {
"global": "^4.3.0",
"mux.js": "4.3.2",
"video.js": "^5.17.0 || ^6.2.0",
"webwackify": "0.1.6"
}
},
"videojs-font": {
"version": "2.1.0",
"resolved": "http://registry.npm.taobao.org/videojs-font/download/videojs-font-2.1.0.tgz",
"integrity": "sha1-olkwpn9snPvyu4jay4xrRR8JM3k=",
"dev": true
},
"videojs-for-react": {
"version": "0.0.3",
"resolved": "http://registry.npm.taobao.org/videojs-for-react/download/videojs-for-react-0.0.3.tgz",
"integrity": "sha1-xruVr5+/UhsUKtfSUKpfCj2jamg=",
"dev": true,
"requires": {
"prop-types": "^15.6.1",
"react": "^16.3.2",
"react-dom": "^16.3.2",
"video.js": "^6.9.0",
"videojs-contrib-hls": "^5.14.1"
}
},
"videojs-ie8": {
"version": "1.1.2",
"resolved": "http://registry.npm.taobao.org/videojs-ie8/download/videojs-ie8-1.1.2.tgz",
"integrity": "sha1-oj09hgitcZK2nGB3/E64SJmNNdk=",
"dev": true,
"requires": {
"es5-shim": "^4.5.1"
}
},
"videojs-vtt.js": {
"version": "0.12.6",
"resolved": "http://registry.npm.taobao.org/videojs-vtt.js/download/videojs-vtt.js-0.12.6.tgz",
"integrity": "sha1-4HhgC9qJnqpvnDMHE0zQyBGUe44=",
"dev": true,
"requires": {
"global": "^4.3.1"
}
},
"vm-browserify": { "vm-browserify": {
"version": "0.0.4", "version": "0.0.4",
"resolved": "http://registry.npm.taobao.org/vm-browserify/download/vm-browserify-0.0.4.tgz", "resolved": "http://registry.npm.taobao.org/vm-browserify/download/vm-browserify-0.0.4.tgz",
@ -13444,12 +13253,6 @@
"resolved": "http://registry.npm.taobao.org/websocket-extensions/download/websocket-extensions-0.1.3.tgz", "resolved": "http://registry.npm.taobao.org/websocket-extensions/download/websocket-extensions-0.1.3.tgz",
"integrity": "sha1-XS/yKXcAPsaHpLhwc9+7rBRszyk=" "integrity": "sha1-XS/yKXcAPsaHpLhwc9+7rBRszyk="
}, },
"webwackify": {
"version": "0.1.6",
"resolved": "http://registry.npm.taobao.org/webwackify/download/webwackify-0.1.6.tgz",
"integrity": "sha1-HUKhKsYYI9fjRaveCE6qpipKles=",
"dev": true
},
"whatwg-encoding": { "whatwg-encoding": {
"version": "1.0.5", "version": "1.0.5",
"resolved": "http://registry.npm.taobao.org/whatwg-encoding/download/whatwg-encoding-1.0.5.tgz", "resolved": "http://registry.npm.taobao.org/whatwg-encoding/download/whatwg-encoding-1.0.5.tgz",
@ -13597,18 +13400,6 @@
"resolved": "http://registry.npm.taobao.org/xdg-basedir/download/xdg-basedir-3.0.0.tgz", "resolved": "http://registry.npm.taobao.org/xdg-basedir/download/xdg-basedir-3.0.0.tgz",
"integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=" "integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ="
}, },
"xhr": {
"version": "2.4.0",
"resolved": "http://registry.npm.taobao.org/xhr/download/xhr-2.4.0.tgz",
"integrity": "sha1-4W5mpF+GmGHu76tBbV7/ci3ECZM=",
"dev": true,
"requires": {
"global": "~4.3.0",
"is-function": "^1.0.1",
"parse-headers": "^2.0.0",
"xtend": "^4.0.0"
}
},
"xml-name-validator": { "xml-name-validator": {
"version": "2.0.1", "version": "2.0.1",
"resolved": "http://registry.npm.taobao.org/xml-name-validator/download/xml-name-validator-2.0.1.tgz", "resolved": "http://registry.npm.taobao.org/xml-name-validator/download/xml-name-validator-2.0.1.tgz",

@ -3,7 +3,6 @@
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"dependencies": { "dependencies": {
"@flatten/array": "^1.1.7",
"@icedesign/base": "^0.2.5", "@icedesign/base": "^0.2.5",
"@novnc/novnc": "^1.1.0", "@novnc/novnc": "^1.1.0",
"antd": "^3.20.1", "antd": "^3.20.1",
@ -48,6 +47,7 @@
"moment": "^2.23.0", "moment": "^2.23.0",
"monaco-editor": "^0.15.6", "monaco-editor": "^0.15.6",
"monaco-editor-webpack-plugin": "^1.7.0", "monaco-editor-webpack-plugin": "^1.7.0",
"npm": "^6.10.1",
"object-assign": "4.1.1", "object-assign": "4.1.1",
"postcss-flexbugs-fixes": "3.2.0", "postcss-flexbugs-fixes": "3.2.0",
"postcss-loader": "2.0.8", "postcss-loader": "2.0.8",
@ -159,7 +159,6 @@
"port": "3007", "port": "3007",
"devDependencies": { "devDependencies": {
"@babel/runtime": "7.0.0-beta.51", "@babel/runtime": "7.0.0-beta.51",
"antd": "^3.6.5",
"babel-plugin-import": "^1.11.0", "babel-plugin-import": "^1.11.0",
"concat": "^1.0.3", "concat": "^1.0.3",
"happypack": "^5.0.1", "happypack": "^5.0.1",

@ -0,0 +1,114 @@
import React, { Component } from 'react';
const $ = window.jQuery
const jQuery = $;
if (!$.drag) {
(function($){
$.fn.dragValidator = function(options){
var x, drag = this, isMove = false, defaults = {
};
var options = $.extend(defaults, options);
//添加背景,文字,滑块
var html = '<div class="drag_bg"></div>'+
'<div class="drag_text" onselectstart="return false;" unselectable="on">拖动滑块验证</div>'+
'<div class="handler handler_bg"></div>';
this.append(html);
var handler = drag.find('.handler');
var drag_bg = drag.find('.drag_bg');
var text = drag.find('.drag_text');
var maxWidth = text.width() - handler.width(); //能滑动的最大间距
//鼠标按下时候的x轴的位置
handler.mousedown(function(e){
isMove = true;
x = e.pageX - parseInt(handler.css('left'), 10);
});
//鼠标指针在上下文移动时移动距离大于0小于最大间距滑块x轴位置等于鼠标移动距离
$(document).mousemove(function(e){
var _x = e.pageX - x;
var handler_offset = handler.offset();
var lastX = e.clientX -x;
lastX = Math.max(0,Math.min(maxWidth,lastX));
if(isMove){
if(_x > 0 && _x <= maxWidth){
handler.css({'left': lastX});
drag_bg.css({'width': lastX});
}
else if(lastX > maxWidth - 5 && lastX < maxWidth + 5 ){ //鼠标指针移动距离达到最大时清空事件
dragOk();
}
}
});
handler.mouseup(function(e){
isMove = false;
var _x = e.pageX - x;
if(text.text() != '验证通过' && _x < maxWidth){ //鼠标松开时,如果没有达到最大距离位置,滑块就返回初始位置
handler.animate({'left': 0});
drag_bg.animate({'width': 0});
}
});
//清空事件
function dragOk(){
options.dragOkCallback && options.dragOkCallback()
var kuaiwidth=drag.width() - handler.width() - 2;
handler.removeClass('handler_bg').addClass('handler_ok_bg');
handler.css({'left':kuaiwidth+'px'})
text.css({'width':kuaiwidth+'px'});
text.text('验证通过');
drag.css({'color': '#fff'});
drag_bg.css({'width':kuaiwidth+'px'})
handler.unbind('mousedown');
$(document).unbind('mousemove');
$(document).unbind('mouseup');
$("#user_verification_notice").html("");
$('#user_verification_notice').parent().hide();
}
};
})(jQuery);
}
class DragValidator extends Component {
componentDidMount () {
// if($("#reg-drag").length>0 && IsPC()){
$("#reg-drag").dragValidator({
height: this.props.height,
dragOkCallback: () => {
this.props.dragOkCallback && this.props.dragOkCallback()
}
});
// }else{
// $("#reg-drag").empty();
// }
}
empty() {
$("#reg-drag").empty();
}
render() {
const height = this.props.height || 45;
const className = this.props.className
const successGreenColor = this.props.successGreenColor || '#29bd8b'
// newMain clearfix
return (
<div id="reg-drag" className={`drag_slider ${className}`}>
<style>{`
.drag_slider .handler {
height: 100%;
}
.drag_slider {
height: ${height}px;
line-height: ${height}px;
}
.drag_slider .drag_bg {
height: ${height}px;
background-color: ${successGreenColor};
}
`}</style>
</div>
);
}
}
export default ( DragValidator );

@ -152,8 +152,8 @@ class UseBank extends Component{
) )
.then((response) => { .then((response) => {
if (response.data.status == 0) { if (response.data.status == 0) {
this.props.showNotification('题库选用成功')
this.props.useBankSuccess && this.props.useBankSuccess(checkBoxValues,response.data.object_ids); this.props.useBankSuccess && this.props.useBankSuccess(checkBoxValues,response.data.object_ids);
this.props.showNotification('题库选用成功')
this.closeSelectBank(); this.closeSelectBank();
this.props.updataleftNavfun() this.props.updataleftNavfun()
this.setState({ this.setState({

@ -1,10 +1,11 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import {getImageUrl} from 'educoder';
import CoursesHomeCard from "./coursesHomeCard.js" import CoursesHomeCard from "./coursesHomeCard.js"
import axios from 'axios'; import axios from 'axios';
import {Input,Pagination,Tooltip} from 'antd'; import {Input,Tooltip} from 'antd';
import './css/CoursesHome.css'; import './css/CoursesHome.css';
import Pagination from '@icedesign/base/lib/pagination';
import '@icedesign/base/lib/pagination/style.js';
const Search = Input.Search; const Search = Input.Search;
class coursesHome extends Component{ class coursesHome extends Component{
@ -38,13 +39,14 @@ class coursesHome extends Component{
} }
//搜索 //搜索
searchValue=(e)=>{ searchValue=(e)=>{
let { search }=this.state; let { search ,order}=this.state;
this.setState({ this.setState({
order:'all', order:order,
page:1 page:1
}) })
this.searchcourses(16,1,'all',search) this.searchcourses(16,1,order,search)
} }
@ -89,7 +91,7 @@ class coursesHome extends Component{
render() { render() {
let { order,search,page,coursesHomelist }=this.state; let { order,search,page,coursesHomelist }=this.state;
console.log(coursesHomelist)
return ( return (
<div> <div>
@ -126,10 +128,16 @@ class coursesHome extends Component{
<CoursesHomeCard {...this.props} {...this.state} <CoursesHomeCard {...this.props} {...this.state}
coursesHomelist={coursesHomelist}></CoursesHomeCard> coursesHomelist={coursesHomelist}></CoursesHomeCard>
{coursesHomelist===undefined?"":coursesHomelist.courses.length===0?<div className="edu-tab-con-box clearfix edu-txt-center mb50">
<img className="edu-nodata-img mb20" src={getImageUrl("images/educoder/nodata.png")}/>
<p className="edu-nodata-p mb20">暂无数据哦~</p>
</div>:""}
{ {
coursesHomelist===undefined?"":coursesHomelist.courses_count > 16? coursesHomelist===undefined?"":coursesHomelist.courses_count > 16?
<div className="educontent mb80 edu-txt-center mt10"> <div className="educontent mb80 edu-txt-center mt10">
<Pagination showQuickJumper current={page} pageSize={16} total={coursesHomelist.courses_count} onChange={this.onChange} /> <Pagination current={page} total={ coursesHomelist.courses_count || 1299 } type="mini" pageSize={16} onChange={this.onChange} />
</div>:"" </div>:""
} }
</div> </div>
@ -139,3 +147,6 @@ class coursesHome extends Component{
} }
} }
export default coursesHome; export default coursesHome;
// {/*<Pagination showQuickJumper current={page} pageSize={16} total={coursesHomelist.courses_count} onChange={this.onChange} />*/}

@ -249,10 +249,10 @@ class ShixunModal extends Component{
} }
<ul className="clearfix greybackHead edu-txt-center"> <ul className="clearfix greybackHead edu-txt-center">
<li className="fl with40 paddingleft22" >实训名称</li> <li className="fl with40 paddingleft22" >实训名称</li>
<li className="fl with30 edu-txt-left">使用院校</li> <li className="fl with25 edu-txt-left">院校</li>
<li className="fl with10">使用人数</li> <li className="fl with11">学习人数</li>
<li className="fl with10">评价等级</li> <li className="fl with11">难度</li>
<li className="fl with10"></li> <li className="fl with11"></li>
</ul> </ul>
@ -271,6 +271,10 @@ class ShixunModal extends Component{
margin-top:0px !important; margin-top:0px !important;
height: 40px; height: 40px;
} }
.with11{
width: 11%;
box-sizing: border-box;
}
` `
} }
</style> </style>
@ -290,11 +294,11 @@ class ShixunModal extends Component{
<span style={{"textAlign":"left","color":"#05101A"}} className="task-hide color-grey-name">{item.shixun_name}</span> <span style={{"textAlign":"left","color":"#05101A"}} className="task-hide color-grey-name">{item.shixun_name}</span>
</Checkbox> </Checkbox>
</li> </li>
<li className="fl with30 edu-txt-left task-hide paddingl5">{item.school_users}</li> <li className="fl with25 edu-txt-left task-hide paddingl5">{item.school}</li>
<li className="fl with10 paddingl10">{item.myshixuns_count}</li> <li className="fl with11 paddingl10">{item.myshixuns_count}</li>
<li className="fl with10 color-orange-tip paddingl10">{item.preference}</li> <li className="fl with11 color-orange-tip paddingl10">{item.level}</li>
<Tooltip title="新窗口查看详情"> <Tooltip title="新窗口查看详情">
<li className="fl with10"><a className="color-blue" href={"/shixuns/"+item.identifier+"/challenges"} target="_blank">详情</a></li> <li className="fl with11"><a className="color-blue" href={"/shixuns/"+item.identifier+"/challenges"} target="_blank">详情</a></li>
</Tooltip> </Tooltip>
</div> </div>
) )

@ -172,7 +172,9 @@ class Exercisestatisticalresult extends Component {
.bor-greyE{ .bor-greyE{
border: 1px solid #EEEEEE!important; border: 1px solid #EEEEEE!important;
} }
.padtop24{
padding-top: 24px;
}
`} `}
</style> </style>
@ -191,7 +193,7 @@ class Exercisestatisticalresult extends Component {
{/*<span className="markdown-body" dangerouslySetInnerHTML={createMarkup(item.ques_title)}></span>*/} {/*<span className="markdown-body" dangerouslySetInnerHTML={createMarkup(item.ques_title)}></span>*/}
</div> </div>
</div> </div>
<div className="fr shixunreporttitles">正确率<span style={{color:'#FF6800'}}> {item.right_percent}%</span></div> <div className="fr shixunreporttitles mt3">正确率<span style={{color:'#FF6800'}}> {item.right_percent}%</span></div>
</div> </div>
{item.ques_type===5? {item.ques_type===5?
@ -199,9 +201,10 @@ class Exercisestatisticalresult extends Component {
return( return(
<div className={"mt20"}> <div className={"mt20"}>
<div className="clearfix edu-back-white poll_list" style={{padding: '0px 20px'}}> <div className="clearfix edu-back-white poll_list" style={{padding: '0px 20px'}}>
<div className="font-16 shixunreporttitle fl" > <div className="font-16 shixunreporttitle fl padding20">
<span>{ite.challenge_position}{ite.challenge_name}</span> <span>{ite.challenge_position}{ite.challenge_name}</span>
</div> </div>
<div className="fr shixunreporttitles padtop24">正确率<span style={{color:'#FF6800'}}>{ite.challenge_percent}%</span></div>
</div> </div>
<Exercisetablesmubu <Exercisetablesmubu
data={ite.challenge_details} data={ite.challenge_details}
@ -227,7 +230,7 @@ class Exercisestatisticalresult extends Component {
<div className="mb40 edu-txt-center padding20-30" <div className="mb40 edu-txt-center padding20-30"
style={ style={
{ {
display: data&&data===undefined?1:data&&data.commit_results.length< 10 ? 'none' : 'block' display: data&&data===undefined?1:data&&data.questions_count.length< 10 ? 'none' : 'block'
} }
}> }>

@ -42,7 +42,7 @@ class Exercisetablesmubus extends Component {
key: 'commit_percent', key: 'commit_percent',
render: (text, record) => ( render: (text, record) => (
<span style={{color:text.type===true? "#29BD8B":'#333333'}}> <span style={{color:text.type===true? "#29BD8B":'#333333'}}>
{text.value!="有效填写量"&&text.value!="wrong"?text.num +"."+ text.value:false} {text.value!="有效填写量"&&text.value!="wrong"?text.value:false}
{text.value==="wrong"?"填写了错误答案":false} {text.value==="wrong"?"填写了错误答案":false}
{text.value==="有效填写量"?"有效填写量":false} {text.value==="有效填写量"?"有效填写量":false}
</span> </span>

@ -114,7 +114,6 @@ class Testpapersettinghomepage extends Component{
axios.get(url).then((response) => { axios.get(url).then((response) => {
console.log(response); console.log(response);
debugger
if(response.data.status&&response.data.status===-1){ if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){ }else if(response.data.status&&response.data.status===-2){
@ -170,7 +169,12 @@ class Testpapersettinghomepage extends Component{
Loadtype:false Loadtype:false
}) })
} }
DownloadType=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
}
Downloadcal=()=>{ Downloadcal=()=>{
this.setState({ this.setState({
DownloadType:false, DownloadType:false,
@ -188,7 +192,7 @@ class Testpapersettinghomepage extends Component{
{...this.props} {...this.props}
value={this.state.DownloadMessageval} value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal} modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType} modalsType={this.DownloadType}
/> />
<div className={"educontent mb20"} style={{width:"1200px"}}> <div className={"educontent mb20"} style={{width:"1200px"}}>
{/* 公用的提示弹框 */} {/* 公用的提示弹框 */}

@ -5,9 +5,9 @@ import {DMDEditor,markdownToHTML } from 'educoder'
import axios from 'axios' import axios from 'axios'
const tagArray = [ const tagArray = [
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', // 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', // 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' // 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
] ]
class fillEmpty extends Component{ class fillEmpty extends Component{
constructor(props){ constructor(props){

@ -4,9 +4,9 @@ import {markdownToHTML} from 'educoder'
import axios from 'axios' import axios from 'axios'
const tagArray = [ const tagArray = [
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', // 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', // 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' // 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
] ]
class Multiple extends Component{ class Multiple extends Component{
constructor(props){ constructor(props){
@ -48,7 +48,7 @@ class Multiple extends Component{
return( return(
<p className="clearfix mb15 df"> <p className="clearfix mb15 df">
<Checkbox className="fl lineh-20 " value={item.choice_id}></Checkbox> <Checkbox className="fl lineh-20 " value={item.choice_id}></Checkbox>
<span class="fl lineh-20 mt1">{tagArray[key]}.</span><span style={{display:"inline-block"}} className="markdown-body mt1" dangerouslySetInnerHTML={{__html: markdownToHTML(item.choice_text)}}></span> <span class="fl lineh-20 mt1"></span><span style={{display:"inline-block"}} className="markdown-body mt1" dangerouslySetInnerHTML={{__html: markdownToHTML(item.choice_text)}}></span>
</p> </p>
) )
}) })

@ -4,9 +4,9 @@ import {Checkbox,Radio, Input} from "antd";
import {markdownToHTML} from 'educoder' import {markdownToHTML} from 'educoder'
import axios from 'axios' import axios from 'axios'
const tagArray = [ const tagArray = [
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', // 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', // 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' // 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
] ]
class single extends Component{ class single extends Component{
constructor(props){ constructor(props){
@ -43,7 +43,7 @@ class single extends Component{
return( return(
<p className={parseInt(questionType.question_type) == 0 ? "clearfix mb15 df" : "fl mr40"}> <p className={parseInt(questionType.question_type) == 0 ? "clearfix mb15 df" : "fl mr40"}>
<Radio className="fl lineh-20" value={item.choice_id}></Radio> <Radio className="fl lineh-20" value={item.choice_id}></Radio>
<span className="fl lineh-20 mr3 mt1">{tagArray[key]}.</span><span style={{display:"inline-block"}} className="markdown-body fl mt1" dangerouslySetInnerHTML={{__html: markdownToHTML(item.choice_text)}}></span> <span className="fl lineh-20 mr3 mt1"></span><span style={{display:"inline-block"}} className="markdown-body fl mt1" dangerouslySetInnerHTML={{__html: markdownToHTML(item.choice_text)}}></span>
</p> </p>
) )
}) })

@ -388,11 +388,12 @@ class GraduationTasksSubmitedit extends Component{
} }
this.props.form.validateFields((err, values) => { this.props.form.validateFields((err, values) => {
if (!err) {
console.log(values.description);
// console.log(fileList); // console.log(fileList);
if(values.description===undefined||values.description===""){ if(values.description===undefined||values.description===""){
this.scrollToAnchor("valuestypes");
debugger
return return
} }
if(workslist.task_type===2){ if(workslist.task_type===2){
@ -418,12 +419,12 @@ class GraduationTasksSubmitedit extends Component{
}) })
let workId=this.props.match.params.work_Id; let workId=this.props.match.params.work_Id;
if(fileList.length===0){ // if(fileList.length===0){
this.setState({ // this.setState({
shixunsreplace:true, // shixunsreplace:true,
}) // })
return // return
} // }
let url="/graduation_works/"+workId+".json"; let url="/graduation_works/"+workId+".json";
axios.put(url, { axios.put(url, {
@ -456,7 +457,7 @@ class GraduationTasksSubmitedit extends Component{
console.log(error) console.log(error)
}) })
}
}); });
} }
@ -472,10 +473,18 @@ class GraduationTasksSubmitedit extends Component{
hidestartshixunsreplacetwo= ()=>{ hidestartshixunsreplacetwo= ()=>{
this.setState({ this.setState({
shixunsreplace:false, shixunsreplace:false,
spinnings:false
}) })
} }
scrollToAnchor = (anchorName) => {
if (anchorName) {
// 找到锚点
let anchorElement = document.getElementById(anchorName);
// 如果对应id的锚点存在就跳转到锚点
if(anchorElement) { anchorElement.scrollIntoView({block: 'start', behavior: 'smooth'}); }
}
}
render(){ render(){
const { getFieldDecorator } = this.props.form; const { getFieldDecorator } = this.props.form;
let {search,fileList, workslist,setvalue,minvalue,minmaxtype,Loadtype,description,attachments, let {search,fileList, workslist,setvalue,minvalue,minmaxtype,Loadtype,description,attachments,
@ -573,7 +582,7 @@ class GraduationTasksSubmitedit extends Component{
{description&&description? {description&&description?
<div> <div>
{/*<Form onSubmit={this.handleSubmit} >*/} {/*<Form onSubmit={this.handleSubmit} >*/}
<div className="stud-class-set pd20 coursenavbox edu-back-white"> <div className="stud-class-set pd20 coursenavbox edu-back-white" id={"valuestypes"}>
<style>{` <style>{`
.uploadBtn.ant-btn { .uploadBtn.ant-btn {
border: none; border: none;

@ -358,6 +358,7 @@ class GraduationTasksSubmitnew extends Component{
//公用数据 //公用数据
Commoninterface = (fileList,selectmemberslist,workslist)=>{ Commoninterface = (fileList,selectmemberslist,workslist)=>{
debugger
let userids=[]; let userids=[];
for(var list of selectmemberslist){ for(var list of selectmemberslist){
@ -379,11 +380,11 @@ class GraduationTasksSubmitnew extends Component{
} }
// if( GraduationTasksnewtype===true){ // if( GraduationTasksnewtype===true){
this.props.form.validateFields((err, values) => { this.props.form.validateFields((err, values) => {
if (!err) {
console.log(values.description);
// console.log(fileList); // console.log(fileList);
if(values.description===undefined||values.description===""){ if(values.description===undefined||values.description===""){
this.scrollToAnchor("valuestypes");
debugger
return return
} }
if(workslist&&workslist.task_type===2){ if(workslist&&workslist.task_type===2){
@ -414,13 +415,12 @@ class GraduationTasksSubmitnew extends Component{
let id=this.props.match.params.task_Id; let id=this.props.match.params.task_Id;
if(fileList.length === 0){ // if(fileList.length === 0){
this.setState({ // this.setState({
shixunsreplace:true, // shixunsreplace:true,
}) // })
return // return
} // }
debugger
let url="/graduation_tasks/"+id+"/graduation_works.json"; let url="/graduation_tasks/"+id+"/graduation_works.json";
axios.post(url, { axios.post(url, {
description:values.description, description:values.description,
@ -452,7 +452,7 @@ debugger
console.log(error) console.log(error)
}) })
}
}); });
// } // }
@ -460,6 +460,7 @@ debugger
//确认 //确认
hidestartshixunsreplace=()=>{ hidestartshixunsreplace=()=>{
debugger
let {fileList,selectmemberslist,workslist}=this.state; let {fileList,selectmemberslist,workslist}=this.state;
this.Commoninterface(fileList,selectmemberslist,workslist); this.Commoninterface(fileList,selectmemberslist,workslist);
@ -468,9 +469,17 @@ debugger
hidestartshixunsreplacetwo=()=>{ hidestartshixunsreplacetwo=()=>{
this.setState({ this.setState({
shixunsreplace:false, shixunsreplace:false,
spinnings:false
}) })
} }
scrollToAnchor = (anchorName) => {
if (anchorName) {
// 找到锚点
let anchorElement = document.getElementById(anchorName);
// 如果对应id的锚点存在就跳转到锚点
if(anchorElement) { anchorElement.scrollIntoView({block: 'start', behavior: 'smooth'}); }
}
}
render(){ render(){
const { getFieldDecorator } = this.props.form; const { getFieldDecorator } = this.props.form;
let {search,fileList, workslist,setvalue,minvalue,minmaxtype,Loadtype, let {search,fileList, workslist,setvalue,minvalue,minmaxtype,Loadtype,
@ -570,7 +579,7 @@ render(){
{/*<Form onSubmit={GraduationTasksnewtype===true?this.handleSubmit:"return false"}*/} {/*<Form onSubmit={GraduationTasksnewtype===true?this.handleSubmit:"return false"}*/}
{/*>*/} {/*>*/}
<div className="stud-class-set pd20 coursenavbox edu-back-white"> <div className="stud-class-set pd20 coursenavbox edu-back-white" id={"valuestypes"}>
<style>{` <style>{`
.uploadBtn.ant-btn { .uploadBtn.ant-btn {
border: none; border: none;

@ -65,12 +65,12 @@ class GraduationTasksappraise extends Component{
} }
goback=()=>{ goback=()=>{
let {datalist}=this.state; // let {datalist}=this.state;
let courseId=this.props.match.params.coursesId; // let courseId=this.props.match.params.coursesId;
let category_id=this.props.match.params.category_id; // let category_id=this.props.match.params.category_id;
//
window.location.href="/courses/"+courseId+"/graduation_tasks/"+datalist.graduation_id; // window.location.href="/courses/"+courseId+"/graduation_tasks/"+datalist.graduation_id;
window.history.go(-1)
} }
Cancelvisible=()=>{ Cancelvisible=()=>{

@ -459,15 +459,15 @@ class GraduationTaskssettingapp extends Component{
}) })
} }
//跳转道描点的地方 // //跳转道描点的地方
scrollToAnchor = (anchorName) => { // scrollToAnchor = (anchorName) => {
if (anchorName) { // if (anchorName) {
// 找到锚点 // // 找到锚点
let anchorElement = document.getElementById(anchorName); // let anchorElement = document.getElementById(anchorName);
// 如果对应id的锚点存在就跳转到锚点 // // 如果对应id的锚点存在就跳转到锚点
if(anchorElement) { anchorElement.scrollIntoView(); } // if(anchorElement) { anchorElement.scrollIntoView(); }
} // }
} // }
saveTaskssetting=()=>{ saveTaskssetting=()=>{

@ -143,13 +143,22 @@ class GraduationTaskssettinglist extends Component{
// console.log(e.target.value) // console.log(e.target.value)
let {teacher_comment, task_status, course_group, cross_comment, order, b_order, search} = this.state; let {teacher_comment, task_status, course_group, cross_comment, order, b_order, search} = this.state;
let listype =list instanceof Array;
if(listype===false||list.length===key){
this.setState({ this.setState({
teacher_comment:list.length===key?undefined:list[0], teacher_comment:null,
loadingstate:true
})
}else{
this.setState({
teacher_comment:list,
loadingstate:true loadingstate:true
}) })
}
if(list.length===key){
if(list.length===key){
this.seacthdata(undefined, task_status, course_group, cross_comment, order, b_order, search,this.state.page);
}else{ }else{
this.seacthdata(list[0], task_status, course_group, cross_comment, order, b_order, search,this.state.page); this.seacthdata(list[0], task_status, course_group, cross_comment, order, b_order, search,this.state.page);
@ -783,16 +792,30 @@ class GraduationTaskssettinglist extends Component{
{this.props.isAdmin()?operation.map((tag,key) => { {this.props.isAdmin()?operation.map((tag,key) => {
return( return(
<div key={key}> <div key={key}>
{/*<Tooltip placement="bottom" title={tag.name==="分配"?"指定该作品的交叉评阅人":tag.name==="调分"?<pre>调整学生最终成绩<br/>*/}
{/*其它历史评分将全部失效</pre>:""}>*/}
{/*{tag.name==="评阅"?tag.status===0?"--":<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >*/}
{/*{tag.name}*/}
{/*</a>*/}
{/*:*/}
{/*<a style={{color:tag.name==="调分"?"#000":'#4CACFF'}}*/}
{/*onClick={tag.name==="调分"?()=>this.showModulationtype(tag.id):tag.name==="分配"?()=>this.showAllocationModal(tag.id):""}>*/}
{/*{tag.status===0?"":tag.name}*/}
{/*</a>*/}
{/*}*/}
{/*</Tooltip>*/}
<Tooltip placement="bottom" title={tag.name==="分配"?"指定该作品的交叉评阅人":tag.name==="调分"?<pre>调整学生最终成绩<br/> <Tooltip placement="bottom" title={tag.name==="分配"?"指定该作品的交叉评阅人":tag.name==="调分"?<pre>调整学生最终成绩<br/>
其它历史评分将全部失效</pre>:""}> 其它历史评分将全部失效</pre>:""}>
{tag.name==="评阅"?tag.status===0?"--":<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} > {tag.name==="评阅"?<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >
{tag.name} {tag.name}
</a> </a>
: :
<a style={{color:tag.name==="调分"?"#000":'#4CACFF'}} <a style={{color:tag.name==="调分"?"#000":'#4CACFF'}}
onClick={tag.name==="调分"?()=>this.showModulationtype(tag.id):tag.name==="分配"?()=>this.showAllocationModal(tag.id):""}> onClick={tag.name==="调分"?()=>this.showModulationtype(tag.id):tag.name==="分配"?()=>this.showAllocationModal(tag.id):""}>
{tag.status===0?"":tag.name} {tag.name}
</a> </a>
} }
@ -855,8 +878,7 @@ class GraduationTaskssettinglist extends Component{
) )
} }
if(taskslistdata&&taskslistdata.have_project===false){
if(taskslistdata&&taskslistdata.have_grouping===false){
columns.some((item,key)=> { columns.some((item,key)=> {
if (item.title === "关联项目") { if (item.title === "关联项目") {
@ -866,6 +888,10 @@ class GraduationTaskssettinglist extends Component{
} }
) )
}
if(taskslistdata&&taskslistdata.have_grouping===false){
columns.some((item,key)=> { columns.some((item,key)=> {
if (item.title === "分组") { if (item.title === "分组") {
@ -1087,7 +1113,7 @@ class GraduationTaskssettinglist extends Component{
{taskslistdata.search_assistants && taskslistdata.search_assistants.teacher_comment && taskslistdata.search_assistants.teacher_comment.map((item,key)=>{ {taskslistdata.search_assistants && taskslistdata.search_assistants.teacher_comment && taskslistdata.search_assistants.teacher_comment.map((item,key)=>{
return( return(
<span key={key}> <span key={key}>
<Checkbox value={item.id} key={item.id} onClick={this.funteachercomment} className="fl ">{item.name} <Checkbox value={item.id} key={item.id} className="fl ">{item.name}
<span>({item.count})</span> <span>({item.count})</span>
</Checkbox> </Checkbox>
</span> </span>
@ -1354,7 +1380,7 @@ class GraduationTaskssettinglist extends Component{
{taskslistdata.search_assistants&&taskslistdata.search_assistants.teacher_comment.map((item,key)=>{ {taskslistdata.search_assistants&&taskslistdata.search_assistants.teacher_comment.map((item,key)=>{
return( return(
<span key={key}> <span key={key}>
<Checkbox value={item.id} onClick={this.funteachercomment} className="fl ">{item.name} <Checkbox value={item.id} className="fl ">{item.name}
<span>({item.count})</span> <span>({item.count})</span>
</Checkbox> </Checkbox>
</span> </span>

@ -50,9 +50,10 @@ class GraduationTasksquestions extends Component{
} }
goback=()=>{ goback=()=>{
let courseId=this.props.match.params.coursesId; // let courseId=this.props.match.params.coursesId;
let category_id=this.props.match.params.category_id; // let category_id=this.props.match.params.category_id;
window.location.href="/courses/"+courseId+"/graduation_tasks/"+category_id; // window.location.href="/courses/"+courseId+"/graduation_tasks/"+category_id;
window.history.go(-1)
} }
end=()=>{ end=()=>{

@ -37,7 +37,7 @@ class GraduationTasks extends Component{
} }
} }
fetchAll = (search,page,order,count) => { fetchAll = (search,page,order,count) => {
debugger
const cid = this.props.match.params.coursesId const cid = this.props.match.params.coursesId
@ -553,7 +553,8 @@ class GraduationTasks extends Component{
}) })
} }
// 题库选用成功后刷新页面 // 题库选用成功后刷新页面
useBankSuccess=()=>{ useBankSuccess=(checkBoxValues,object_ids)=>{
debugger
let {search,page,order,all_count} = this.state; let {search,page,order,all_count} = this.state;
this.fetchAll(search,page,order,all_count) this.fetchAll(search,page,order,all_count)
} }
@ -650,7 +651,7 @@ class GraduationTasks extends Component{
</Link> </Link>
</WordsBtn> : ""} </WordsBtn> : ""}
{this.props.isAdmin() ?<UseBank {...this.props} {...this.state} object_type={"gtask"} useBankSuccess={this.useBankSuccess}></UseBank>:""} {this.props.isAdmin() ?<UseBank {...this.props} {...this.state} object_type={"gtask"} useBankSuccess={()=>this.useBankSuccess()}></UseBank>:""}
</React.Fragment> </React.Fragment>
} }

@ -1360,13 +1360,6 @@ class Listofworks extends Component {
// }); // });
} }
Downloadcal=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
}
ChangeTab=(e)=>{ ChangeTab=(e)=>{
this.props.ChangeTab(e); this.props.ChangeTab(e);
} }
@ -1376,7 +1369,7 @@ class Listofworks extends Component {
let {columns,computeTimetype, page, boolgalist,limit,experience,course_groupysls, course_groupyslstwo, unlimited, unlimitedtwo, loadingstate, viewtrainingdata, game_list, data, course_group_info, order, teacherdata, task_status, checkedValuesine, searchtext, teacherlist, visible, visibles, jobsettingsdata} = this.state; let {columns,computeTimetype, page, boolgalist,limit,experience,course_groupysls, course_groupyslstwo, unlimited, unlimitedtwo, loadingstate, viewtrainingdata, game_list, data, course_group_info, order, teacherdata, task_status, checkedValuesine, searchtext, teacherlist, visible, visibles, jobsettingsdata} = this.state;
// //
// console.log(teacherdata&&teacherdata.shixun_identifier) // console.log(teacherdata&&teacherdata.shixun_identifier)
// console.log(course_group_info) // console.log(this.props.teacherdata&&this.props.teacherdata.publish_immediately)
// console.log(JSON.stringify(this.props)); // console.log(JSON.stringify(this.props));
return ( return (
<div className=" clearfix " style={{margin: "auto" , minWidth:"1200px"}}> <div className=" clearfix " style={{margin: "auto" , minWidth:"1200px"}}>
@ -1512,7 +1505,7 @@ class Listofworks extends Component {
<li className="clearfix "> <li className="clearfix ">
<span className="fl mr10 color-grey-6 ">计算成绩时间{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')}</span> <span className="fl mr10 color-grey-6 ">计算成绩时间{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')}</span>
<span> <span>
{computeTimetype===true?<div className={"computeTime font-13"} onClick={this.setComputeTime}> {this.props.teacherdata&&this.props.teacherdata.publish_immediately===false&&computeTimetype===true?<div className={"computeTime font-13"} onClick={this.setComputeTime}>
计算成绩 计算成绩
</div>:<div className={"computeTimes font-13"} onClick={this.setComputeTime}> </div>:<div className={"computeTimes font-13"} onClick={this.setComputeTime}>
计算成绩 计算成绩

@ -350,6 +350,9 @@ class Listofworksstudentone extends Component {
if(result === undefined){ if(result === undefined){
return return
} }
try {
if (result.status === 200) { if (result.status === 200) {
if(this.props.isNotMember()===false) { if(this.props.isNotMember()===false) {
this.setState({ this.setState({
@ -375,9 +378,11 @@ class Listofworksstudentone extends Component {
} }
} }
}catch (e) {
console.log(e);
}
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error);
}) })
} }

@ -2,19 +2,24 @@ import React, {Component} from "react";
import {Link, NavLink} from 'react-router-dom'; import {Link, NavLink} from 'react-router-dom';
import {WordsBtn, ActionBtn} from 'educoder'; import {WordsBtn, ActionBtn} from 'educoder';
import axios from 'axios'; import axios from 'axios';
import {
notification
} from "antd";
import '../css/members.css'; import '../css/members.css';
import "../common/formCommon.css"; import "../common/formCommon.css";
import '../css/Courses.css'; import '../css/Courses.css';
import './style.css'; import './style.css';
import '../css/busyWork.css' import '../css/busyWork.css';
import '../poll/pollStyle.css' import '../poll/pollStyle.css';
import Listofworks from "./Listofworks"; import Listofworks from "./Listofworks";
import Listofworksstudentone from './Listofworksstudentone' import Listofworksstudentone from './Listofworksstudentone';
import Trainingjobsetting from './Trainingjobsetting' import Trainingjobsetting from './Trainingjobsetting';
import Workquestionandanswer from './Workquestionandanswer' import Workquestionandanswer from './Workquestionandanswer';
import CoursesListType from '../coursesPublic/CoursesListType'; import CoursesListType from '../coursesPublic/CoursesListType';
import ShixunStudentWork from "./ShixunStudentWork"; import ShixunStudentWork from "./ShixunStudentWork";
import Startshixuntask from "../coursesPublic/Startshixuntask"; import Startshixuntask from "../coursesPublic/Startshixuntask";
import HomeworkModal from "../coursesPublic/HomeworkModal";
import moment from 'moment';
class ShixunHomeworkPage extends Component { class ShixunHomeworkPage extends Component {
constructor(props) { constructor(props) {
@ -71,12 +76,190 @@ class ShixunHomeworkPage extends Component {
shixuntypes: types[3] shixuntypes: types[3]
}) })
} }
//立即发布
homeworkstart = () => {
debugger
let homeworkid = this.props.match.params.homeworkid;
let url = "/homework_commons/" + homeworkid + "/publish_groups.json";
axios.get(url).then((response) => {
if (response.status === 200) {
let starttime = this.props.getNowFormatDates(1);
let endtime = this.props.getNowFormatDates(2);
this.setState({
modalname: "立即发布",
modaltype: response.data.course_groups === null || response.data.course_groups.length === 0 ? 2 : 1,
svisible: true,
Topval:"学生将立即收到作业",
// Botvalleft:"暂不发布",
Botval:`本操作只对"未发布"的分班有效`,
starttime: "发布时间:" + moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
endtime: "截止时间:" + endtime,
starttimes:starttime,
typs:"start",
Cancelname: "暂不发布",
Savesname: "立即发布",
Cancel: this.homeworkhide,
Saves: this.homeworkstartend,
course_groups: response.data.course_groups,
})
}
}).catch((error) => {
console.log(error)
});
}
getcourse_groupslist = (id) => {
this.setState({
course_groupslist: id
})
}
isupdatas = () => {
// var homeworkid = this.props.match.params.homeworkid;
// // this.Gettitleinformation(homeworkid);
// this.Getalistofworks(homeworkid);
}
homeworkhide = () => {
this.isupdatas()
this.setState({
modalname: undefined,
modaltype: undefined,
svisible: false,
Topval: undefined,
Topvalright: undefined,
Botvalleft: undefined,
Botval: undefined,
starttime: undefined,
endtime: undefined,
Cancelname: undefined,
Savesname: undefined,
Cancel: undefined,
Saves: undefined,
StudentList_value: undefined,
addname: undefined,
addnametype: false,
addnametab: undefined,
course_groupyslstwo: undefined,
typs:undefined,
starttimes:undefined,
})
}
// 立即发布
homeworkstartend = (ds,endtime) => {
var homeworkid = this.props.match.params.homeworkid;
let {course_groupslist} = this.state;
let coursesId = this.props.match.params.coursesId;
let url = "/courses/" + coursesId + "/homework_commons/publish_homework.json";
axios.post(url, {
homework_ids: [homeworkid],
group_ids: course_groupslist,
end_time:endtime,
}).then((result) => {
if (result.status === 200) {
if (result.data.status === 0) {
notification.open({
message: "提示",
description: result.data.message
});
this.homeworkhide()
}
}
}).catch((error) => {
console.log(error);
})
}
//立即截止
homeworkends = () => {
let homeworkid = this.props.match.params.homeworkid;
let url = "/homework_commons/" + homeworkid + "/end_groups.json";
axios.get(url).then((response) => {
if (response.status === 200) {
this.setState({})
this.setState({
modalname: "立即截止",
modaltype: response.data.course_groups === null || response.data.course_groups.length === 0 ? 2 : 1,
svisible: true,
Topval:"学生将不能再提交作业",
// Botvalleft:"暂不截止",
Botval:`本操作只对"提交中"的分班有效`,
Cancelname: "暂不截止",
Savesname: "立即截止",
Cancel: this.homeworkhide,
Saves: this.coursetaskend,
starttime: undefined,
endtime: undefined,
course_groups: response.data.course_groups,
typs:"end",
})
}
}).catch((error) => {
console.log(error)
});
}
//立即截止确定按钮
coursetaskend = () => {
var homeworkid = this.props.match.params.homeworkid;
let {course_groupslist} = this.state;
const cid = this.props.match.params.coursesId;
let url = "/courses/" + cid + "/homework_commons/end_homework.json";
axios.post(url, {
group_ids: course_groupslist,
homework_ids: [homeworkid],
})
.then((response) => {
if (response.data.status == 0) {
notification.open({
message: "提示",
description: response.data.message
});
this.homeworkhide()
}
})
.catch(function (error) {
console.log(error);
});
}
render() { render() {
let {tab, jobsettingsdata, teacherdata} = this.state; let {tab, jobsettingsdata, teacherdata} = this.state;
const isAdmin = this.props.isAdmin(); const isAdmin = this.props.isAdmin();
return ( return (
<div className="newMain clearfix "> <div className="newMain clearfix ">
{/*立即发布*/}
<HomeworkModal
modaltype={this.state.modaltype}
modalname={this.state.modalname}
visible={this.state.svisible}
Topval={this.state.Topval}
Topvalright={this.state.Topvalright}
Botvalleft={this.state.Botvalleft}
Botval={this.state.Botval}
starttime={this.state.starttime}
endtime={this.state.endtime}
Cancelname={this.state.Cancelname}
Savesname={this.state.Savesname}
Cancel={this.state.Cancel}
Saves={this.state.Saves}
course_groups={this.state.course_groups}
getcourse_groupslist={(id) => this.getcourse_groupslist(id)}
starttimes={this.state.starttimes}
typs={this.state.typs}
/>
<div className={"educontent mb20"} style={{width: "1200px"}}> <div className={"educontent mb20"} style={{width: "1200px"}}>
<div className="educontent mb20"> <div className="educontent mb20">
@ -188,14 +371,14 @@ class ShixunHomeworkPage extends Component {
<a className="fr color-blue font-16" onClick={this.workshowmodel}>代码查重</a> <a className="fr color-blue font-16" onClick={this.workshowmodel}>代码查重</a>
: "" : ""} : "" : ""}
{this.state.view_report === true ? <Link className="fr color-blue font-16" target={"_blank"} {this.state.view_report === true ? <Link className="fr color-blue font-16" target={"_blank"}
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/shixun_work_report`}> to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${this.props.match.params.homeworkid}/shixun_work_report`}>
查看实训报告 查看实训报告
</Link> : ""} </Link> : ""}
{ {
teacherdata === undefined ? "" teacherdata === undefined ? ""
: teacherdata.commit_des === null || teacherdata.commit_des === undefined ? "" : : teacherdata.commit_des === null || teacherdata.commit_des === undefined ? "" :
<a className="fr color-blue font-16" <a className="fr color-blue font-16"
href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${teacherdata === undefined ? "" : teacherdata.id}/commitsummary/${this.state.props.match.params.homeworkid}`}>{teacherdata.commit_des}</a> href={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${teacherdata === undefined ? "" : teacherdata.id}/commitsummary/${this.props.match.params.homeworkid}`}>{teacherdata.commit_des}</a>
} }
{teacherdata === undefined ? "" : <Startshixuntask {teacherdata === undefined ? "" : <Startshixuntask
{...this.props} {...this.props}

@ -501,13 +501,6 @@ class ShixunStudentWork extends Component {
// console.log(error) // console.log(error)
// }); // });
} }
Downloadcal=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
}
ChangeTab=(e)=>{ ChangeTab=(e)=>{
this.props.ChangeTab(e); this.props.ChangeTab(e);
} }
@ -572,7 +565,7 @@ class ShixunStudentWork extends Component {
key: 'operating', key: 'operating',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<a onClick={()=>this.Viewstudenttraininginformation("/courses/"+this.state.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+this.props.match.params.homeworkid+"/review_detail/"+record.operating)} >查看</a> <a onClick={()=>this.Viewstudenttraininginformation("/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+this.props.match.params.homeworkid+"/review_detail/"+record.operating)} >查看</a>
</span> </span>
) )
}, },

@ -94,12 +94,6 @@ class ShixunWorkReport extends Component {
} }
} }
} }
Downloadcal=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
}
render() { render() {
let{data} =this.state; let{data} =this.state;
let category_id=data===undefined?"":data.category.category_id; let category_id=data===undefined?"":data.category.category_id;

@ -1714,12 +1714,7 @@ class Trainingjobsetting extends Component {
// }); // });
} }
Downloadcal=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
}
testscripttip =(e)=>{ testscripttip =(e)=>{
if(e === 0){ if(e === 0){
this.setState({ this.setState({

@ -344,12 +344,6 @@ class Workquestionandanswer extends Component {
// console.log(error) // console.log(error)
// }); // });
} }
Downloadcal=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
}
ChangeTab=(e)=>{ ChangeTab=(e)=>{
this.props.ChangeTab(e); this.props.ChangeTab(e);
} }

@ -59,7 +59,6 @@ class EducoderInteresse extends Component {
display: "flex", display: "flex",
justifyContent: "center", justifyContent: "center",
width: "100%", width: "100%",
height: "600px",
marginTop: "20px", marginTop: "20px",
}}> }}>
<InterestpageComponent {...this.props} {...this.state}> <InterestpageComponent {...this.props} {...this.state}>

@ -20,6 +20,12 @@ class DownloadMessage extends Component {
window.open(`/users/${this.props.user.login}/private_messages`) window.open(`/users/${this.props.user.login}/private_messages`)
} }
DownloadType=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
}
Downloadcal=()=>{ Downloadcal=()=>{
this.setState({ this.setState({
DownloadType:false, DownloadType:false,

@ -671,11 +671,11 @@ class MainContentContainer extends Component {
// 之前的task_commit方法 // 之前的task_commit方法
gameBuild(fileUpdateResponse, first) { gameBuild(fileUpdateResponse, first) {
const { st, challenge, output_sets, onRunCodeTestFinish, resetTestSetsExpandedArray, showSnackbar, time_limit, game } = this.props const { st, challenge, output_sets, onRunCodeTestFinish, resetTestSetsExpandedArray, showSnackbar, time_limit, game } = this.props
const { resubmit, content_modified } = fileUpdateResponse.data; const { resubmit, content_modified, sec_key } = fileUpdateResponse.data;
const timeOut = time_limit; const timeOut = time_limit;
// http://localhost:3000/myshixuns/so5w6iap97/stages/zl6kx8f7vfpo/game_build?first=1&resubmit=GDBEX741_1993 // http://localhost:3000/myshixuns/so5w6iap97/stages/zl6kx8f7vfpo/game_build?first=1&resubmit=GDBEX741_1993
// const game_build_url = `${locationPath}/game_build?first=${first}&resubmit=${resubmit}&content_modified=${content_modified}` // const game_build_url = `${locationPath}/game_build?first=${first}&resubmit=${resubmit}&content_modified=${content_modified}`
const game_build_url = `/tasks/${game.identifier}/game_build.json?first=${first}&resubmit=${resubmit}&content_modified=${content_modified}` const game_build_url = `/tasks/${game.identifier}/game_build.json?first=${first}&resubmit=${resubmit}&content_modified=${content_modified}&sec_key=${sec_key}`
// var timeOut = parseInt(<%= @myshixun.main_mirror.try(:time_limit) %>); // 超时参数 // var timeOut = parseInt(<%= @myshixun.main_mirror.try(:time_limit) %>); // 超时参数
@ -702,7 +702,7 @@ class MainContentContainer extends Component {
var gameStatusIntervalId = setInterval(()=>{ var gameStatusIntervalId = setInterval(()=>{
// let game_status_url = `${locationPath}/game_status?port=${port}&resubmit=${resubmit||""}&time_out=${timeOutFlag}` // let game_status_url = `${locationPath}/game_status?port=${port}&resubmit=${resubmit||""}&time_out=${timeOutFlag}`
let game_status_url = `/tasks/${game.identifier}/game_status.json?port=${port}&resubmit=${resubmit||""}&time_out=${timeOutFlag}` let game_status_url = `/tasks/${game.identifier}/game_status.json?port=${port}&resubmit=${resubmit||""}&time_out=${timeOutFlag}&sec_key=${sec_key}`
axios.get(game_status_url, { axios.get(game_status_url, {
// withCredentials: true, // withCredentials: true,

@ -66,7 +66,7 @@ class ShixunPathCard extends Component{
} }
</div> </div>
):( ):(
<div className="edu-tab-con-box clearfix edu-txt-center"> <div className="edu-tab-con-box clearfix edu-txt-center mb50">
<img className="edu-nodata-img mb20" src={getImageUrl("images/educoder/nodata.png")}/> <img className="edu-nodata-img mb20" src={getImageUrl("images/educoder/nodata.png")}/>
<p className="edu-nodata-p mb20">暂无数据哦~</p> <p className="edu-nodata-p mb20">暂无数据哦~</p>
</div> </div>

@ -1,7 +1,9 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import PathCard from "./ShixunPathCard.js" import PathCard from "./ShixunPathCard.js"
import axios from 'axios'; import axios from 'axios';
import {Input,Pagination} from 'antd'; import {Input} from 'antd';
import Pagination from '@icedesign/base/lib/pagination';
import '@icedesign/base/lib/pagination/style.js';
import './ShixunPaths.css' import './ShixunPaths.css'
@ -129,7 +131,7 @@ class ShixunPathSearch extends Component{
{ {
total_count > 16 && total_count > 16 &&
<div className="educontent mb80 edu-txt-center mt10"> <div className="educontent mb80 edu-txt-center mt10">
<Pagination showQuickJumper defaultCurrent={page} current={page} pageSize={16} total={total_count} onChange={this.onChange} /> <Pagination current={page} total={ total_count || 1299 } type="mini" pageSize={16} onChange={this.onChange} />
</div> </div>
} }
@ -138,3 +140,6 @@ class ShixunPathSearch extends Component{
} }
} }
export default ShixunPathSearch; export default ShixunPathSearch;
// <Pagination showQuickJumper defaultCurrent={page} current={page} pageSize={16} total={total_count} onChange={this.onChange} />

@ -58,7 +58,8 @@ export default class TPMchallengesnew extends Component {
marktype:false, marktype:false,
editPracticesendtype:false, editPracticesendtype:false,
CreatePracticesendtype:false, CreatePracticesendtype:false,
exec_time:20 exec_time:20,
shixunExec_timeType:false
} }
} }
@ -212,6 +213,13 @@ export default class TPMchallengesnew extends Component {
this.props.showSnackbar("技能标签为空") this.props.showSnackbar("技能标签为空")
return return
} }
if(exec_time===null||exec_time===undefined||exec_time===""){
this.setState({
shixunExec_timeType:false
})
return
}
const exercise_editormdvalue = this.exercisememoMDRef.current.getValue().trim(); const exercise_editormdvalue = this.exercisememoMDRef.current.getValue().trim();
let id = this.props.match.params.shixunId; let id = this.props.match.params.shixunId;
@ -329,6 +337,14 @@ export default class TPMchallengesnew extends Component {
}) })
return return
} }
if(exec_time===null||exec_time===undefined||exec_time===""){
debugger
this.setState({
shixunExec_timeType:false
})
return
}
axios.put(url, { axios.put(url, {
tab:0, tab:0,
identifier:id, identifier:id,
@ -394,6 +410,8 @@ export default class TPMchallengesnew extends Component {
) )
}) })
console.log(this.state.shixunExec_timeType )
return ( return (
<React.Fragment> <React.Fragment>
<div className="educontent mt30 mb30"> <div className="educontent mt30 mb30">
@ -572,11 +590,14 @@ export default class TPMchallengesnew extends Component {
<div className="edu-back-white padding40-20 mb20"> <div className="edu-back-white padding40-20 mb20">
<p className="color-grey-6 font-16 mb30">服务配置</p> <p className="color-grey-6 font-16 mb30">服务配置</p>
<div className="clearfix mb5"> <div className="clearfix mb5">
<span className="mr30 color-orange pt10">*</span> <span className="color-orange pt10 fl">*</span>
<label className="panel-form-label fl">评测时限(S)</label> <label className="panel-form-label fl">评测时限(S)</label>
<div className="pr fl with80 status_con"> <div className="pr fl with80 status_con">
<input value={this.state.exec_time} className="panel-box-sizing task-form-100 task-height-40" placeholder="请输入类别名称" onInput={this.setexec_time}/> <input value={this.state.exec_time} className="panel-box-sizing task-form-100 task-height-40" placeholder="请输入类别名称" onInput={this.setexec_time}/>
</div> </div>
<span
className={this.state.shixunExec_timeType === true ? "color-orange mt8 fl block ml20" : "color-orange mt8 fl none"}
id="new_shixun_name"><i className="fa fa-exclamation-circle mr3"></i></span>
<div className="cl"></div> <div className="cl"></div>
</div> </div>
</div> </div>

@ -34,7 +34,7 @@ class AccountPage extends Component {
constructor (props) { constructor (props) {
super(props) super(props)
this.state = { this.state = {
basicInfo:undefined basicInfo: {}
} }
} }
@ -57,8 +57,12 @@ class AccountPage extends Component {
if(result.data && result.data.base_info_completed == false){ if(result.data && result.data.base_info_completed == false){
this.props.history.push(`/account/profile/edit`); this.props.history.push(`/account/profile/edit`);
} }
// "authentication": "uncertified", // "uncertified" | "applying" | "certified"
this.setState({ this.setState({
basicInfo: Object.assign({}, {...result.data}, { avatar_url: `${result.data.avatar_url}?t=${new Date().getTime()}`}) basicInfo: Object.assign({}, {...result.data}, {
avatar_url: `${result.data.avatar_url}?t=${new Date().getTime()}`,
gender: result.data.gender == null || result.data.gender == undefined ? 0 : result.data.gender
})
}) })
} }
}).catch((error)=>{ }).catch((error)=>{

@ -3,6 +3,8 @@ import React, {Component} from 'react';
import {BrowserRouter as Router, Route, Link, Switch} from "react-router-dom"; import {BrowserRouter as Router, Route, Link, Switch} from "react-router-dom";
import {getImageUrl, DragValidator} from 'educoder'; import {getImageUrl, DragValidator} from 'educoder';
import DragValidatortwo from '../../../src/common/components/DragValidatortwo'
import {Tabs, Input, Checkbox, Button, notification} from 'antd'; import {Tabs, Input, Checkbox, Button, notification} from 'antd';
import axios from 'axios'; import axios from 'axios';
import './common.css' import './common.css'
@ -21,7 +23,7 @@ class LoginRegisterComponent extends Component {
login: "", login: "",
password: "", password: "",
passwords: "", passwords: "",
seconds: 60, seconds: 35,
codes: "", codes: "",
getverificationcodes: true, getverificationcodes: true,
Phonenumberisnotco: undefined, Phonenumberisnotco: undefined,
@ -29,6 +31,8 @@ class LoginRegisterComponent extends Component {
s: 'text', s: 'text',
classpass: "text", classpass: "text",
readonlyInput: true, readonlyInput: true,
dragOk: false,
Whethertoverify:false,
} }
} }
@ -57,15 +61,27 @@ class LoginRegisterComponent extends Component {
} }
//倒计时 //倒计时
getverificationcode = () => { getverificationcode = () => {
if (this.state.Phonenumberisnotcobool === false || this.state.Phonenumberisnotcobool === undefined) {
if (this.state.login && this.state.login.length === 0) { if(this.state.login === undefined || this.state.login.length===0){
this.openNotification("请输入手机号或邮箱"); this.openNotification("请输入手机号或邮箱");
return return;
} else { }
this.openNotification("请输入正确的手机号或邮箱");
//这是判断是否手机正确
if(this.state.Phonenumberisnotcobool === true){
this.openNotification(this.state.Phonenumberisnotcos);
this.setState({
Whethertoverify:this.state.Whethertoverify===true?false:true,
})
return;
} }
//拖动滑动验证
if(this.state.dragOk===undefined||this.state.dragOk === false){
this.openNotification("拖动滑块验证");
return; return;
} }
if (this.state.getverificationcodes === true) { if (this.state.getverificationcodes === true) {
this.setState({ this.setState({
getverificationcodes: undefined, getverificationcodes: undefined,
@ -78,7 +94,7 @@ class LoginRegisterComponent extends Component {
clearInterval(timer); clearInterval(timer);
this.setState({ this.setState({
getverificationcodes: false, getverificationcodes: false,
seconds: 60, seconds: 35,
}) })
} }
}); });
@ -96,7 +112,7 @@ class LoginRegisterComponent extends Component {
clearInterval(timer); clearInterval(timer);
this.setState({ this.setState({
getverificationcodes: false, getverificationcodes: false,
seconds: 60, seconds: 35,
}) })
} }
@ -115,8 +131,7 @@ class LoginRegisterComponent extends Component {
} }
}).then((result) => { }).then((result) => {
//验证有问题{"status":1,"message":"success"} //验证有问题{"status":1,"message":"success"}
console.log(result); this.openNotification("验证码已发送,请注意查收!",2);
}).catch((error) => { }).catch((error) => {
console.log(error); console.log(error);
@ -133,26 +148,28 @@ class LoginRegisterComponent extends Component {
Retrievepassword = () => { Retrievepassword = () => {
if (this.state.Phonenumberisnotcobool === false) { if (this.state.Phonenumberisnotcobool === false) {
if (this.state.login.length === 0) { if (this.state.login.length === 0) {
this.openNotification("请输入手机号或邮箱"); this.openNotification("请输入正确的手机号或邮箱");
return return
} }
this.openNotification("请输入正确的手机号或邮箱");
return;
} }
if (this.state.login === undefined || this.state.login == "") { if (this.state.login === undefined || this.state.login === "") {
this.openNotification(`请输入登录手机号码或邮箱`); this.openNotification(`请输入登录手机号码或邮箱`);
return return
} else if (this.state.password === undefined || this.state.password == "") { }
if (this.state.password === undefined || this.state.password === "") {
this.openNotification(`请输入密码`); this.openNotification(`请输入密码`);
return return
} else if (this.state.passwords === undefined || this.state.passwords == "") { }
if (this.state.passwords === undefined || this.state.passwords === "") {
this.openNotification(`请输入密码`); this.openNotification(`请输入密码`);
return return
} else if (this.state.password !== this.state.passwords) { }
if (this.state.password !== this.state.passwords) {
this.openNotification(`两次密码不相同`); this.openNotification(`两次密码不相同`);
return return
} else if (this.state.codes === undefined || this.state.codes == "") { }
if (this.state.codes === undefined || this.state.codes === "") {
this.openNotification(`请输入验证码`); this.openNotification(`请输入验证码`);
return return
} }
@ -286,6 +303,12 @@ class LoginRegisterComponent extends Component {
return return
} }
} }
//是否验证通过
dragOkCallback = () => {
console.log(this.state.login);
this.Emailphonenumberverification(this.state.login)
}
//邮箱手机号验证 //邮箱手机号验证
Emailphonenumberverification = (value) => { Emailphonenumberverification = (value) => {
var url = `/accounts/valid_email_and_phone.json`; var url = `/accounts/valid_email_and_phone.json`;
@ -295,17 +318,31 @@ class LoginRegisterComponent extends Component {
type: 2, type: 2,
} }
}).then((result) => { }).then((result) => {
//验证有问题{"status":1,"message":"success"} console.log(result);
// console.log(result); if(result){
this.openNotification("验证码已发送,请注意查收!", 2); if(result.data.status===-2){
console.log(value.length);
this.setState({
Phonenumberisnotco: result.data.message,
Phonenumberisnotcobool: true,
dragOk:false,
Whethertoverify:this.state.Whethertoverify===true?false:true,
})
return;
}else {
this.setState({
Phonenumberisnotco: undefined,
Phonenumberisnotcobool: false,
dragOk:true,
})
return;
}
}
}).catch((error) => { }).catch((error) => {
console.log(error); console.log(error);
// this.setState({
// login:"",
// logins:"",
// })
}) })
} }
@ -325,6 +362,7 @@ class LoginRegisterComponent extends Component {
Phonenumberisnotco, Phonenumberisnotco,
readonlyInput, readonlyInput,
codes, codes,
Whethertoverify,
} = this.state } = this.state
// height: 346px; // height: 346px;
return ( return (
@ -390,9 +428,10 @@ class LoginRegisterComponent extends Component {
` `
} }
</style> </style>
{/*onBlur={(e) => this.inputOnBlur(e)}*/}
<Input style={loginInputsyl} type="text" autoComplete="off" onClick={this.changeTypey} <Input style={loginInputsyl} type="text" autoComplete="off" onClick={this.changeTypey}
className={"loginInputzhuche"} className={"loginInputzhuche"}
placeholder="输入注册手机号或邮箱" value={this.state.login} onBlur={(e) => this.inputOnBlur(e)} placeholder="输入注册手机号或邮箱" value={this.state.login}
onChange={this.loginInputonChange} style={{marginTop: '10px', height: "38px"}}></Input> onChange={this.loginInputonChange} style={{marginTop: '10px', height: "38px"}}></Input>
{ {
Phonenumberisnotco && Phonenumberisnotco != "" ? Phonenumberisnotco && Phonenumberisnotco != "" ?
@ -401,11 +440,29 @@ class LoginRegisterComponent extends Component {
</p> </p>
: <div style={{height: "25px"}}></div> : <div style={{height: "25px"}}></div>
} }
{
Whethertoverify===false?
<DragValidator <DragValidator
height={38} successGreenColor="#29bd8b" height={38} successGreenColor="#29bd8b"
style={{height: "38px", width: "100%"}} style={{height: "38px", width: "100%"}}
dragOkCallback={this.dragOkCallback} dragOkCallback={()=>this.dragOkCallback()}
></DragValidator> ></DragValidator>
:
""
}
{
Whethertoverify===true?
<DragValidatortwo
height={38} successGreenColor="#29bd8b"
style={{height: "38px", width: "100%"}}
dragOkCallback={()=>this.dragOkCallback()}
></DragValidatortwo>
:
""
}
<Input type={classpass} <Input type={classpass}
className={"loginInputzhuche"} className={"loginInputzhuche"}
onClick={this.changeType} autoComplete="new-password" onChange={this.loginInputonChanges} onClick={this.changeType} autoComplete="new-password" onChange={this.loginInputonChanges}

@ -7,6 +7,7 @@ import {Tabs, Input, Checkbox, Button, notification,Menu} from 'antd';
import passopen from '../../../src/images/login/passopen.png'; import passopen from '../../../src/images/login/passopen.png';
import passoff from '../../../src/images/login/passoff.png'; import passoff from '../../../src/images/login/passoff.png';
import axios from 'axios'; import axios from 'axios';
import DragValidatortwo from '../../../src/common/components/DragValidatortwo'
import './common.css' import './common.css'
const { TabPane } = Tabs; const { TabPane } = Tabs;
const loginInputsyl = { const loginInputsyl = {
@ -26,16 +27,17 @@ class LoginRegisterComponent extends Component {
// //
// console.log("LoginRegisterComponent"); // console.log("LoginRegisterComponent");
// console.log(props); // console.log("29");
// console.log(props.loginstatus); // console.log(props.loginstatus);
if(props.loginstatus === true){ if(props.loginstatus === true){
// console.log(props.loginstatus);
this.state = { this.state = {
tab:["0"], tab:["0"],
activeKey: 0, activeKey: 0,
classpass: "text", classpass: "text",
// 登录 // 登录
passopens: passopen, passopens: passopen,
seconds: 60, seconds: 35,
discodeBtn: false, discodeBtn: false,
clearInterval: false, clearInterval: false,
autoLogin: true, autoLogin: true,
@ -53,17 +55,19 @@ class LoginRegisterComponent extends Component {
Phonenumberisnotco: undefined, Phonenumberisnotco: undefined,
Phonenumberisnotcos: undefined, Phonenumberisnotcos: undefined,
Phonenumberisnotcobool: false, Phonenumberisnotcobool: false,
Whethertoverify:false,
} }
} }
else if(props.loginstatus === false){ if(props.loginstatus === false){
// console.log(props.loginstatus);
this.state = { this.state = {
tab:["1"], tab:["1"],
activeKey: '1', activeKey: '1',
classpass: "text", classpass: "text",
// 登录 // 登录
passopens: passopen, passopens: passopen,
seconds: 60, seconds: 35,
discodeBtn: false, discodeBtn: false,
clearInterval: false, clearInterval: false,
autoLogin: true, autoLogin: true,
@ -81,6 +85,7 @@ class LoginRegisterComponent extends Component {
Phonenumberisnotco: undefined, Phonenumberisnotco: undefined,
Phonenumberisnotcos: undefined, Phonenumberisnotcos: undefined,
Phonenumberisnotcobool: false, Phonenumberisnotcobool: false,
Whethertoverify:false,
} }
} }
@ -163,81 +168,8 @@ class LoginRegisterComponent extends Component {
return; return;
} }
} }
// var telephone = $("#telephoneAdd.tianjia_phone").val();
var regph = /^[1][3,4,5,6,7,8][0-9]{9}$/;
// var email = $("#add_email.tianjia_email").val();
var regemail = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;
// [1]手机号开头必须是1 [3,4,5,6,7,8] 第二位是3-8中的一个 [0-9]{9} 后边9位可以是0-9的任意数字。
var stringdata = undefined;
if (!regph.test(value)) {
stringdata = "手机号格式不正确";
if (id === 1) {
this.setState({
Phonenumberisnotco: stringdata,
Phonenumberisnotcobool: false,
})
} else if (id === 2) {
this.setState({
Phonenumberisnotcos: stringdata,
Phonenumberisnotcobool: false,
})
}
} else {
if (id === 1) {
this.setState({
Phonenumberisnotco: undefined,
Phonenumberisnotcobool: true,
})
} else if (id === 2) {
this.setState({
Phonenumberisnotcos: undefined,
Phonenumberisnotcobool: true,
})
this.Emailphonenumberverification(value, id) this.Emailphonenumberverification(value, id)
}
return
}
if (!regemail.test(value)) {
if ((value.indexOf("@") != -1) === true) {
stringdata = "邮箱格式不正确";
} else {
stringdata = "手机号格式不正确";
// if (!regph.test(value)) {
// // 这里先判断是不是手机号然后在判断是不是邮箱然后又判断是不是手机号,如果不是手机号就是账号
// stringdata=undefined;
// }
}
if (id === 1) {
this.setState({
Phonenumberisnotco: stringdata,
Phonenumberisnotcobool: false,
})
} else if (id === 2) {
this.setState({
Phonenumberisnotcos: stringdata,
Phonenumberisnotcobool: false,
})
this.Emailphonenumberverification(value, id)
}
return
} else {
if (id === 1) {
this.setState({
Phonenumberisnotco: undefined,
Phonenumberisnotcobool: true,
})
} else if (id === 2) {
this.setState({
Phonenumberisnotcos: undefined,
Phonenumberisnotcobool: true,
})
this.Emailphonenumberverification(value, id)
}
return
}
} }
// -------------------- REGISTER START // -------------------- REGISTER START
onReadAgreementChange = (e) => { onReadAgreementChange = (e) => {
@ -245,7 +177,9 @@ class LoginRegisterComponent extends Component {
} }
//是否验证通过 //是否验证通过
dragOkCallback = () => { dragOkCallback = () => {
this.setState({dragOk: true}) console.log(this.state.logins);
this.Emailphonenumberverification(this.state.logins, 2)
} }
// -------------------- REGISTER END // -------------------- REGISTER END
@ -294,7 +228,7 @@ class LoginRegisterComponent extends Component {
} }
//注册接口 //注册接口
postregistered = () => { postregistered = () => {
if (this.state.logins === undefined || this.state.logins == "") { if (this.state.logins === undefined || this.state.logins === "") {
this.openNotification(`请输入登录手机号码或邮箱`,2); this.openNotification(`请输入登录手机号码或邮箱`,2);
return return
@ -348,14 +282,58 @@ class LoginRegisterComponent extends Component {
}).then((result) => { }).then((result) => {
//验证有问题{"status":1,"message":"success"} //验证有问题{"status":1,"message":"success"}
// console.log(result); // console.log(result);
// this.setState({dragOk: true})
if(result){
if(result.data.status===-2){
if (id === 1) {
console.log(value.length);
if(result.data.message==="该手机号码或邮箱已被注册"){
this.setState({
Phonenumberisnotco: undefined,
Phonenumberisnotcobool: false,
dragOk:true,
})
}else {
this.setState({
Phonenumberisnotco: result.data.message,
Phonenumberisnotcobool: true,
dragOk:false,
Whethertoverify:this.state.Whethertoverify===true?false:true,
})
}
return;
} else if (id === 2) {
this.setState({
Phonenumberisnotcos: result.data.message,
Phonenumberisnotcobool: true,
dragOk:false,
Whethertoverify:this.state.Whethertoverify===true?false:true,
})
return;
}
}else {
if (id === 1) {
console.log(value.length);
this.setState({
Phonenumberisnotco: undefined,
Phonenumberisnotcobool: false,
dragOk:true,
})
return;
} else if (id === 2) {
this.setState({
Phonenumberisnotcos: undefined,
Phonenumberisnotcobool: false,
dragOk:true,
})
return;
}
}
}
}).catch((error) => { }).catch((error) => {
// console.log(error);
// this.setState({
// login:"",
// logins:"",
// })
}) })
} }
//短信验证 //短信验证
@ -398,13 +376,22 @@ class LoginRegisterComponent extends Component {
//倒计时 //倒计时
getverificationcode = () => { getverificationcode = () => {
if (this.state.Phonenumberisnotcobool === false ||this.state.Phonenumberisnotcobool === undefined) { console.log(this.state.Phonenumberisnotcobool);
if (this.state.logins&&this.state.logins.length === 0) { console.log(this.state.dragOk);
this.openNotification("请输入手机号或邮箱",2); if(this.state.logins === undefined || this.state.logins.length===0){
return this.openNotification("请输入手机号或邮箱");
}else { return;
this.openNotification("请输入正确的手机号或邮箱",2);
} }
//这是判断是否手机正确
if(this.state.Phonenumberisnotcobool === true){
this.openNotification(this.state.Phonenumberisnotcos);
this.setState({
Whethertoverify:this.state.Whethertoverify===true?false:true,
})
return;
}
if(this.state.dragOk===undefined||this.state.dragOk === false){
this.openNotification("拖动滑块验证");
return; return;
} }
@ -420,7 +407,7 @@ class LoginRegisterComponent extends Component {
clearInterval(timer); clearInterval(timer);
this.setState({ this.setState({
getverificationcodes: false, getverificationcodes: false,
seconds: 60, seconds: 35,
}) })
} }
}); });
@ -438,7 +425,7 @@ class LoginRegisterComponent extends Component {
clearInterval(timer); clearInterval(timer);
this.setState({ this.setState({
getverificationcodes: false, getverificationcodes: false,
seconds: 60, seconds: 35,
}) })
} }
@ -459,9 +446,18 @@ class LoginRegisterComponent extends Component {
}else{ }else{
stirngt= e.target.value; stirngt= e.target.value;
} }
if (e.target.value.length === 0) {
this.setState({
Phonenumberisnotco: undefined,
Phonenumberisnotcobool: false,
login: stirngt,
})
}else{
this.setState({ this.setState({
login: stirngt, login: stirngt,
}) })
}
} }
//失去焦点判断 //失去焦点判断
@ -488,8 +484,7 @@ class LoginRegisterComponent extends Component {
} }
//获取注册登入 //获取注册登入
loginInputonChanges = (e) => { loginInputonChanges = (e) => {
// console.log(e.target.value); console.log(e.target.value);
var stirngt; var stirngt;
if(e.target.value.length>0){ if(e.target.value.length>0){
var str= e.target.value.replace(/\s*/g,"") var str= e.target.value.replace(/\s*/g,"")
@ -497,9 +492,17 @@ class LoginRegisterComponent extends Component {
}else{ }else{
stirngt= e.target.value; stirngt= e.target.value;
} }
if (e.target.value.length === 0) {
this.setState({ this.setState({
Phonenumberisnotcos: undefined,
Phonenumberisnotcobool: false,
logins: stirngt, logins: stirngt,
}) })
}else{
this.setState({
logins: stirngt,
})
}
} }
//获取注册密码 //获取注册密码
@ -562,8 +565,10 @@ class LoginRegisterComponent extends Component {
Phonenumberisnotcos, Phonenumberisnotcos,
codes, codes,
tab, tab,
dragOk,
Whethertoverify,
// 注册 // 注册
readAgreement, dragOk, readAgreement,
} = this.state } = this.state
// height: 346px; // height: 346px;
if (this.state.seconds === 0) { if (this.state.seconds === 0) {
@ -685,7 +690,6 @@ class LoginRegisterComponent extends Component {
value={this.state.logins} value={this.state.logins}
type="text" autoComplete="off" type="text" autoComplete="off"
onChange={this.loginInputonChanges} onChange={this.loginInputonChanges}
onBlur={(e) => this.inputOnBlur(e, 2)}
style={{marginTop: '30px' , height: '38px',color:'#999999',fontSize:"14px"}}></Input> style={{marginTop: '30px' , height: '38px',color:'#999999',fontSize:"14px"}}></Input>
{ {
Phonenumberisnotcos && Phonenumberisnotcos != "" ? Phonenumberisnotcos && Phonenumberisnotcos != "" ?
@ -695,12 +699,29 @@ class LoginRegisterComponent extends Component {
: <div style={{height:"25px"}}></div> : <div style={{height:"25px"}}></div>
} }
{
Whethertoverify===false?
<DragValidator <DragValidator
height={38} className="loginInput" successGreenColor="#29bd8b" height={38} className="loginInput" successGreenColor="#29bd8b"
style={{ height: '38px'}} style={{ height: '38px'}}
dragOkCallback={this.dragOkCallback} dragOkCallback={this.dragOkCallback}
></DragValidator> ></DragValidator>
:
""
}
{
Whethertoverify===true?
<DragValidatortwo
height={38} className="loginInput" successGreenColor="#29bd8b"
style={{ height: '38px'}}
dragOkCallback={this.dragOkCallback}
></DragValidatortwo>
:
""
}
<div className="mt25"> <div className="mt25">
<Input className="fl mr5 font-14 color-grey-9 loginInputzhuche" name="codes" type="text" autoComplete="off" readonly <Input className="fl mr5 font-14 color-grey-9 loginInputzhuche" name="codes" type="text" autoComplete="off" readonly
@ -726,10 +747,7 @@ class LoginRegisterComponent extends Component {
</div> </div>
{/*<Input type="text" name="username"*/}
{/* style={{height: '0', width: '0', border: 'none', display: "none"}}/>*/}
{/*<Input type="password" name="password" id="password" autoComplete="new-password"*/}
{/* style={{height: '0', width: '0', border: 'none', display: "none"}}/>*/}
<style> <style>
{ {
` `

@ -44,25 +44,31 @@ class AccountBasic extends Component {
setValue=(basicInfo)=>{ setValue=(basicInfo)=>{
if(basicInfo){ if(basicInfo){
//if(basicInfo.nickname){
this.setState({
nameLength:basicInfo.nickname?basicInfo.nickname.length:0,
showRealName:basicInfo.show_realname,
identity:basicInfo.identity
})
//}
this.props.form.setFieldsValue({ this.props.form.setFieldsValue({
nickname:basicInfo.nickname, nickname:basicInfo.nickname,
name:!basicInfo.show_realname ? this.hideRealName(basicInfo.name) : basicInfo.name, name:!basicInfo.show_realname ? this.hideRealName(basicInfo.name) : basicInfo.name,
student_No:basicInfo.student_id,
sex:String(basicInfo.gender), sex:String(basicInfo.gender),
job:map[basicInfo.identity], job:basicInfo.identity,
org:basicInfo.school_name, org:basicInfo.school_name,
org2:basicInfo.department_name, org2:basicInfo.department_name,
city:[basicInfo.location,basicInfo.location_city]
})
setTimeout(() => {
// 等显示后再set
this.props.form.setFieldsValue({
student_No:basicInfo.student_id,
job1:basicInfo && basicInfo.identity=="teacher" ? basicInfo.technical_title:"教授", job1:basicInfo && basicInfo.identity=="teacher" ? basicInfo.technical_title:"教授",
job2:basicInfo && basicInfo.identity=="professional" ? basicInfo.technical_title:"企业管理者", job2:basicInfo && basicInfo.identity=="professional" ? basicInfo.technical_title:"企业管理者",
city:[basicInfo.location,basicInfo.location_city]
}) })
}, 100)
//if(basicInfo.nickname){
this.setState({
nameLength:basicInfo.nickname?basicInfo.nickname.length:0,
showRealName:basicInfo.show_realname,
identity:basicInfo.identity
})
//}
} }
} }
@ -109,14 +115,15 @@ class AccountBasic extends Component {
let url=`/users/accounts/${basicInfo.id}.json` let url=`/users/accounts/${basicInfo.id}.json`
axios.put((url),{ axios.put((url),{
nickname:values.nickname, nickname:values.nickname,
name:values.name, // 认证中的不能修改
name: basicInfo.authentication == 'uncertified' ? values.name : basicInfo.name,
show_realname:this.state.showRealName, show_realname:this.state.showRealName,
gender:parseInt(values.sex), gender:parseInt(values.sex),
location:values.city[0], location:values.city[0],
location_city:values.city[1], location_city:values.city[1],
identity:values.job=="教师"?"teacher":values.job=="学生"?"student":"professional", identity: this.state.identity || (values.job=="teacher"?"teacher":values.job=="student"?"student":"professional"),
technical_title:values.job1 || values.job2, technical_title:values.job1 || values.job2,
student_id:values.job=="学生" ? values.student_No : null, student_id:values.job=="student" ? values.student_No : null,
school_id:this.state.school_id, school_id:this.state.school_id,
department_id:this.state.department_id department_id:this.state.department_id
}).then((result)=>{ }).then((result)=>{
@ -146,16 +153,21 @@ class AccountBasic extends Component {
} }
} }
// 将名字隐藏起来 getHiddenName(name) {
hideRealName=(name)=>{ if (!name) return ''
let len=parseInt(name.length)-1; let len=parseInt(name.length)-1;
let str=""; let str="";
for(var i = 0; i < len; i++){ str += "*"; } for(var i = 0; i < len; i++){ str += "*"; }
const newName = name.substr(0,1)+str;
return newName
}
name = name.substr(0,1)+str; // 将名字隐藏起来
hideRealName=(name)=>{
const newName = this.getHiddenName(name)
this.props.form.setFieldsValue({ this.props.form.setFieldsValue({
name name: newName
}) })
} }
@ -365,7 +377,7 @@ class AccountBasic extends Component {
label="姓名" label="姓名"
className="formItemInline" className="formItemInline"
> >
{getFieldDecorator('name', { { basicInfo.authentication == 'uncertified' ? <React.Fragment>{getFieldDecorator('name', {
rules: [{ rules: [{
// initialValue: this.state.cityDefaultValue, // initialValue: this.state.cityDefaultValue,
required: true, required: true,
@ -373,10 +385,19 @@ class AccountBasic extends Component {
}], }],
})( })(
<Input placeholder="请输入您的姓名" suffix={ <Input placeholder="请输入您的姓名" suffix={
<i className={showRealName?"iconfont icon-xianshi font-18 color-blue":"iconfont icon-yincang font-18 color-blue"} onClick={()=>this.showOrHide(showRealName,basicInfo.name)}></i> <i className={showRealName?"iconfont icon-xianshi font-18 color-blue":"iconfont icon-yincang font-18 color-blue"}
onClick={()=>this.showOrHide(showRealName,basicInfo.name)}></i>
}></Input> }></Input>
)} )}
<span>{ showRealName ? '(显示:平台将显示您的真实姓名)' : '(隐藏:平台将显示你的昵称)' }</span> <span>{ showRealName ? '(显示:平台将显示您的真实姓名)' : '(隐藏:平台将显示你的昵称)' }</span>
</React.Fragment> :
<div className="df" style={{ 'justify-content': 'center' }}>
<span className="mr8" >{showRealName ? this.props.basicInfo.name : this.getHiddenName(this.props.basicInfo.name)}</span>
<i className={showRealName?"iconfont icon-xianshi font-18 color-blue":"iconfont icon-yincang font-18 color-blue"}
onClick={()=>this.showOrHide(showRealName,basicInfo.name)}></i>
<span>{ showRealName ? '(显示:平台将显示您的真实姓名)' : '(隐藏:平台将显示你的昵称)' }</span>
</div>
}
</Form.Item> </Form.Item>
<Form.Item <Form.Item

@ -16,7 +16,7 @@ class AccountNav extends Component {
let { basicInfo } = this.props let { basicInfo } = this.props
console.log(this.props); console.log(this.props);
const path = window.location.pathname const path = window.location.pathname
const isBasic = path.indexOf('basic') != -1 || path == "/account" const isBasic = path.indexOf('profile') != -1 || path == "/account"
const isCertification = path.indexOf('certification') != -1 const isCertification = path.indexOf('certification') != -1
const isSecure = path.indexOf('secure') != -1 const isSecure = path.indexOf('secure') != -1
return ( return (
@ -37,13 +37,10 @@ class AccountNav extends Component {
<i className="iconfont icon-jibenxinxi color-grey-9 font-16"></i> <i className="iconfont icon-jibenxinxi color-grey-9 font-16"></i>
基本信息 基本信息
{ {
(basicInfo.authentication == 'uncertified' || basicInfo.authentication == 'applying') && basicInfo.base_info_completed == true ?
<i className="status fr iconfont icon-wancheng color-green-light font-16"></i> :
<i className="status fr iconfont icon-tishi color-red font-16"></i> <i className="status fr iconfont icon-tishi color-red font-16"></i>
} }
{
basicInfo.authentication == 'certified' &&
<i className="status fr iconfont icon-wancheng color-green-light font-16"></i>
}
</li> </li>
<li className={`navItem ${isCertification ? 'active' : ''}`} onClick={this.toCertification}> <li className={`navItem ${isCertification ? 'active' : ''}`} onClick={this.toCertification}>
<i className="iconfont icon-renzhengxinxi color-grey-9 font-16"></i> <i className="iconfont icon-renzhengxinxi color-grey-9 font-16"></i>

@ -121,7 +121,7 @@ class ChangeHeaderPicModal extends Component{
render(){ render(){
const { course_lists } = this.state const { course_lists } = this.state
const { moduleName, current_user } = this.props const { moduleName, current_user } = this.props
const userHeaderImgUrl = `${getUrl()}/images/${current_user.image_url}` const userHeaderImgUrl = current_user ? `${getUrl()}/images/${current_user.image_url}` : ''
return( return(
<ModalWrapper <ModalWrapper
ref="modalWrapper" ref="modalWrapper"

@ -73,7 +73,7 @@
display: flex; display: flex;
flex-direction:column; flex-direction:column;
margin-left: 73px; margin-left: 73px;
margin-top: 15px; margin-top: 8px;
} }
.ysldivhomediv2{ .ysldivhomediv2{
width: 110px; width: 110px;

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save