diff --git a/public/react/config/webpack.config.dev.js b/public/react/config/webpack.config.dev.js index 2fc1bbe64..80973be75 100644 --- a/public/react/config/webpack.config.dev.js +++ b/public/react/config/webpack.config.dev.js @@ -28,8 +28,8 @@ const env = getClientEnvironment(publicUrl); // The production configuration is different and lives in a separate file. module.exports = { // 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. - devtool: 'cheap-module-source-map', + // See the discussion in https://github.com/facebookincubator/create-react-app/issues/343.s + devtool: "source-map", // 开启调试 // These are the "entry points" to our application. // 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. diff --git a/public/react/config/webpack.config.prod.js b/public/react/config/webpack.config.prod.js index a69eff349..0abd707af 100644 --- a/public/react/config/webpack.config.prod.js +++ b/public/react/config/webpack.config.prod.js @@ -58,7 +58,7 @@ module.exports = { bail: true, // We generate sourcemaps in production. This is slow but gives good results. // You can exclude the *.map files from the build during deployment. - // devtool: shouldUseSourceMap ? 'nosources-source-map' : false, //正式版 + // devtool: shouldUseSourceMap ? 'nosources-source-map' : false, //正式版 devtool: shouldUseSourceMap ? 'source-map' : false,//测试版 // In production, we only want to load the polyfills and the app code. entry: [require.resolve('./polyfills'), paths.appIndexJs], diff --git a/public/react/config/webpackDevServer.config.js b/public/react/config/webpackDevServer.config.js index 8e3d95c3d..f12d31594 100644 --- a/public/react/config/webpackDevServer.config.js +++ b/public/react/config/webpackDevServer.config.js @@ -1,95 +1,95 @@ -'use strict'; - -const errorOverlayMiddleware = require('react-dev-utils/errorOverlayMiddleware'); -const noopServiceWorkerMiddleware = require('react-dev-utils/noopServiceWorkerMiddleware'); -const ignoredFiles = require('react-dev-utils/ignoredFiles'); -const config = require('./webpack.config.dev'); -const paths = require('./paths'); - -const protocol = process.env.HTTPS === 'true' ? 'https' : 'http'; -const host = process.env.HOST || '0.0.0.0'; - -module.exports = function(proxy, allowedHost) { - return { - // WebpackDevServer 2.4.3 introduced a security fix that prevents remote - // websites from potentially accessing local content through DNS rebinding: - // https://github.com/webpack/webpack-dev-server/issues/887 - // https://medium.com/webpack/webpack-dev-server-middleware-security-issues-1489d950874a - // However, it made several existing use cases such as development in cloud - // environment or subdomains in development significantly more complicated: - // https://github.com/facebookincubator/create-react-app/issues/2271 - // https://github.com/facebookincubator/create-react-app/issues/2233 - // While we're investigating better solutions, for now we will take a - // compromise. Since our WDS configuration only serves files in the `public` - // folder we won't consider accessing them a vulnerability. However, if you - // use the `proxy` feature, it gets more dangerous because it can expose - // remote code execution vulnerabilities in backends like Django and Rails. - // So we will disable the host check normally, but enable it if you have - // specified the `proxy` setting. Finally, we let you override it if you - // really know what you're doing with a special environment variable. - disableHostCheck: - !proxy || process.env.DANGEROUSLY_DISABLE_HOST_CHECK === 'true', - // Enable gzip compression of generated files. - compress: true, - // Silence WebpackDevServer's own logs since they're generally not useful. - // It will still show compile warnings and errors with this setting. - clientLogLevel: 'none', - // By default WebpackDevServer serves physical files from current directory - // in addition to all the virtual build products that it serves from memory. - // This is confusing because those files won’t automatically be available in - // production build folder unless we copy them. However, copying the whole - // project directory is dangerous because we may expose sensitive files. - // Instead, we establish a convention that only files in `public` directory - // get served. Our build script will copy `public` into the `build` folder. - // In `index.html`, you can get URL of `public` folder with %PUBLIC_URL%: - // - // In JavaScript code, you can access it with `process.env.PUBLIC_URL`. - // Note that we only recommend to use `public` folder as an escape hatch - // for files like `favicon.ico`, `manifest.json`, and libraries that are - // for some reason broken when imported through Webpack. If you just want to - // use an image, put it in `src` and `import` it from JavaScript instead. - contentBase: paths.appPublic, - // By default files from `contentBase` will not trigger a page reload. - watchContentBase: true, - // Enable hot reloading server. It will provide /sockjs-node/ endpoint - // for the WebpackDevServer client so it can learn when the files were - // updated. The WebpackDevServer client is included as an entry point - // in the Webpack development configuration. Note that only changes - // to CSS are currently hot reloaded. JS changes will refresh the browser. - hot: true, - // It is important to tell WebpackDevServer to use the same "root" path - // as we specified in the config. In development, we always serve from /. - publicPath: config.output.publicPath, - // WebpackDevServer is noisy by default so we emit custom message instead - // by listening to the compiler events with `compiler.plugin` calls above. - quiet: true, - // Reportedly, this avoids CPU overload on some systems. - // https://github.com/facebookincubator/create-react-app/issues/293 - // src/node_modules is not ignored to support absolute imports - // https://github.com/facebookincubator/create-react-app/issues/1065 - watchOptions: { - ignored: ignoredFiles(paths.appSrc), - }, - // Enable HTTPS if the HTTPS environment variable is set to 'true' - https: protocol === 'https', - host: host, - overlay: false, - historyApiFallback: { - // Paths with dots should still use the history fallback. - // See https://github.com/facebookincubator/create-react-app/issues/387. - disableDotRule: true, - }, - public: allowedHost, - proxy, - before(app) { - // This lets us open files from the runtime error overlay. - app.use(errorOverlayMiddleware()); - // This service worker file is effectively a 'no-op' that will reset any - // previous service worker registered for the same host:port combination. - // We do this in development to avoid hitting the production cache if - // it used the same host and port. - // https://github.com/facebookincubator/create-react-app/issues/2272#issuecomment-302832432 - app.use(noopServiceWorkerMiddleware()); - }, - }; -}; +'use strict'; + +const errorOverlayMiddleware = require('react-dev-utils/errorOverlayMiddleware'); +const noopServiceWorkerMiddleware = require('react-dev-utils/noopServiceWorkerMiddleware'); +const ignoredFiles = require('react-dev-utils/ignoredFiles'); +const config = require('./webpack.config.dev'); +const paths = require('./paths'); + +const protocol = process.env.HTTPS === 'true' ? 'https' : 'http'; +const host = process.env.HOST || '0.0.0.0'; + +module.exports = function(proxy, allowedHost) { + return { + // WebpackDevServer 2.4.3 introduced a security fix that prevents remote + // websites from potentially accessing local content through DNS rebinding: + // https://github.com/webpack/webpack-dev-server/issues/887 + // https://medium.com/webpack/webpack-dev-server-middleware-security-issues-1489d950874a + // However, it made several existing use cases such as development in cloud + // environment or subdomains in development significantly more complicated: + // https://github.com/facebookincubator/create-react-app/issues/2271 + // https://github.com/facebookincubator/create-react-app/issues/2233 + // While we're investigating better solutions, for now we will take a + // compromise. Since our WDS configuration only serves files in the `public` + // folder we won't consider accessing them a vulnerability. However, if you + // use the `proxy` feature, it gets more dangerous because it can expose + // remote code execution vulnerabilities in backends like Django and Rails. + // So we will disable the host check normally, but enable it if you have + // specified the `proxy` setting. Finally, we let you override it if you + // really know what you're doing with a special environment variable. + disableHostCheck: + !proxy || process.env.DANGEROUSLY_DISABLE_HOST_CHECK === 'true', + // Enable gzip compression of generated files. + compress: true, + // Silence WebpackDevServer's own logs since they're generally not useful. + // It will still show compile warnings and errors with this setting. + clientLogLevel: 'none', + // By default WebpackDevServer serves physical files from current directory + // in addition to all the virtual build products that it serves from memory. + // This is confusing because those files won’t automatically be available in + // production build folder unless we copy them. However, copying the whole + // project directory is dangerous because we may expose sensitive files. + // Instead, we establish a convention that only files in `public` directory + // get served. Our build script will copy `public` into the `build` folder. + // In `index.html`, you can get URL of `public` folder with %PUBLIC_URL%: + // + // In JavaScript code, you can access it with `process.env.PUBLIC_URL`. + // Note that we only recommend to use `public` folder as an escape hatch + // for files like `favicon.ico`, `manifest.json`, and libraries that are + // for some reason broken when imported through Webpack. If you just want to + // use an image, put it in `src` and `import` it from JavaScript instead. + contentBase: paths.appPublic, + // By default files from `contentBase` will not trigger a page reload. + watchContentBase: true, + // Enable hot reloading server. It will provide /sockjs-node/ endpoint + // for the WebpackDevServer client so it can learn when the files were + // updated. The WebpackDevServer client is included as an entry point + // in the Webpack development configuration. Note that only changes + // to CSS are currently hot reloaded. JS changes will refresh the browser. + hot: true, + // It is important to tell WebpackDevServer to use the same "root" path + // as we specified in the config. In development, we always serve from /. + publicPath: config.output.publicPath, + // WebpackDevServer is noisy by default so we emit custom message instead + // by listening to the compiler events with `compiler.plugin` calls above. + quiet: true, + // Reportedly, this avoids CPU overload on some systems. + // https://github.com/facebookincubator/create-react-app/issues/293 + // src/node_modules is not ignored to support absolute imports + // https://github.com/facebookincubator/create-react-app/issues/1065 + watchOptions: { + ignored: ignoredFiles(paths.appSrc), + }, + // Enable HTTPS if the HTTPS environment variable is set to 'true' + https: protocol === 'https', + host: host, + overlay: false, + historyApiFallback: { + // Paths with dots should still use the history fallback. + // See https://github.com/facebookincubator/create-react-app/issues/387. + disableDotRule: true, + }, + public: allowedHost, + proxy, + before(app) { + // This lets us open files from the runtime error overlay. + app.use(errorOverlayMiddleware()); + // This service worker file is effectively a 'no-op' that will reset any + // previous service worker registered for the same host:port combination. + // We do this in development to avoid hitting the production cache if + // it used the same host and port. + // https://github.com/facebookincubator/create-react-app/issues/2272#issuecomment-302832432 + app.use(noopServiceWorkerMiddleware()); + }, + }; +}; diff --git a/public/react/package.json b/public/react/package.json index 54519f009..21f37b76e 100644 --- a/public/react/package.json +++ b/public/react/package.json @@ -42,6 +42,7 @@ "immutability-helper": "^2.6.6", "install": "^0.12.2", "jest": "20.0.4", + "js-base64": "^2.5.1", "js-file-download": "^0.4.7", "lodash": "^4.17.5", "loglevel": "^1.6.1", @@ -164,6 +165,7 @@ "babel-plugin-import": "^1.11.0", "concat": "^1.0.3", "happypack": "^5.0.1", + "js-base64": "^2.5.1", "videojs-for-react": "^0.0.3", "webpack-bundle-analyzer": "^3.0.3", "webpack-parallel-uglify-plugin": "^1.1.0" diff --git a/public/react/public/js/jsFromMiddleLayer/base64.js b/public/react/public/js/jsFromMiddleLayer/base64.js deleted file mode 100755 index c4df1c0de..000000000 --- a/public/react/public/js/jsFromMiddleLayer/base64.js +++ /dev/null @@ -1,103 +0,0 @@ -function Base64() { - - // private property - _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; - - // public method for encoding - this.encode = function (input) { - var output = ""; - var chr1, chr2, chr3, enc1, enc2, enc3, enc4; - var i = 0; - input = _utf8_encode(input); - while (i < input.length) { - chr1 = input.charCodeAt(i++); - chr2 = input.charCodeAt(i++); - chr3 = input.charCodeAt(i++); - enc1 = chr1 >> 2; - enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); - enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); - enc4 = chr3 & 63; - if (isNaN(chr2)) { - enc3 = enc4 = 64; - } else if (isNaN(chr3)) { - enc4 = 64; - } - output = output + - _keyStr.charAt(enc1) + _keyStr.charAt(enc2) + - _keyStr.charAt(enc3) + _keyStr.charAt(enc4); - } - return output; - } - - // public method for decoding - this.decode = function (input) { - var output = ""; - var chr1, chr2, chr3; - var enc1, enc2, enc3, enc4; - var i = 0; - input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); - while (i < input.length) { - enc1 = _keyStr.indexOf(input.charAt(i++)); - enc2 = _keyStr.indexOf(input.charAt(i++)); - enc3 = _keyStr.indexOf(input.charAt(i++)); - enc4 = _keyStr.indexOf(input.charAt(i++)); - chr1 = (enc1 << 2) | (enc2 >> 4); - chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); - chr3 = ((enc3 & 3) << 6) | enc4; - output = output + String.fromCharCode(chr1); - if (enc3 != 64) { - output = output + String.fromCharCode(chr2); - } - if (enc4 != 64) { - output = output + String.fromCharCode(chr3); - } - } - output = _utf8_decode(output); - return output; - } - - // private method for UTF-8 encoding - _utf8_encode = function (string) { - string = string.replace(/\r\n/g,"\n"); - var utftext = ""; - for (var n = 0; n < string.length; n++) { - var c = string.charCodeAt(n); - if (c < 128) { - utftext += String.fromCharCode(c); - } else if((c > 127) && (c < 2048)) { - utftext += String.fromCharCode((c >> 6) | 192); - utftext += String.fromCharCode((c & 63) | 128); - } else { - utftext += String.fromCharCode((c >> 12) | 224); - utftext += String.fromCharCode(((c >> 6) & 63) | 128); - utftext += String.fromCharCode((c & 63) | 128); - } - - } - return utftext; - } - - // private method for UTF-8 decoding - _utf8_decode = function (utftext) { - var string = ""; - var i = 0; - var c = c1 = c2 = 0; - while ( i < utftext.length ) { - c = utftext.charCodeAt(i); - if (c < 128) { - string += String.fromCharCode(c); - i++; - } else if((c > 191) && (c < 224)) { - c2 = utftext.charCodeAt(i+1); - string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); - i += 2; - } else { - c2 = utftext.charCodeAt(i+1); - c3 = utftext.charCodeAt(i+2); - string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); - i += 3; - } - } - return string; - } -} \ No newline at end of file diff --git a/public/react/src/common/SnackbarHOC.js b/public/react/src/common/SnackbarHOC.js index 1fd1407dd..a59607bf4 100644 --- a/public/react/src/common/SnackbarHOC.js +++ b/public/react/src/common/SnackbarHOC.js @@ -1,63 +1,72 @@ -import React, { Component } from 'react'; -import Snackbar from 'material-ui/Snackbar'; -import Fade from 'material-ui/transitions/Fade'; - -export function SnackbarHOC(options = {}) { - return function wrap(WrappedComponent) { - return class Wrapper extends Component { - constructor(props) { - super(props); - this.showSnackbar = this.showSnackbar.bind(this) - this.state = { - snackbarText: '', - snackbarOpen: false, - } - } - - handleSnackbarClose() { - this.setState({ - snackbarOpen: false, - snackbarVertical: '', - snackbarHorizontal: '', - }) - } - - // 全局的snackbar this.props.showSnackbar调用即可 - showSnackbar(text, vertical, horizontal) { - this.setState({ - snackbarOpen: true, - snackbarText: text, - snackbarVertical: vertical, - snackbarHorizontal: horizontal, - }) - } - render() { - const { snackbarOpen, snackbarText, snackbarHorizontal, snackbarVertical } = this.state; - - - return ( - - this.handleSnackbarClose()} - transition={Fade} - SnackbarContentProps={{ - 'aria-describedby': 'message-id', - }} - resumeHideDuration={2000} - message={{this.state.snackbarText}} - /> - - - - - ) - } - } - } +import React, { Component } from 'react'; +import Snackbar from 'material-ui/Snackbar'; +import Fade from 'material-ui/transitions/Fade'; +import { notification } from 'antd' +export function SnackbarHOC(options = {}) { + return function wrap(WrappedComponent) { + return class Wrapper extends Component { + constructor(props) { + super(props); + this.showSnackbar = this.showSnackbar.bind(this) + this.state = { + snackbarText: '', + snackbarOpen: false, + } + } + + handleSnackbarClose() { + this.setState({ + snackbarOpen: false, + snackbarVertical: '', + snackbarHorizontal: '', + }) + } + + // 全局的snackbar this.props.showSnackbar调用即可 + showSnackbar(description, message = "提示",icon) { + // this.setState({ + // snackbarOpen: true, + // snackbarText: text, + // snackbarVertical: vertical, + // snackbarHorizontal: horizontal, + // }) + const data = { + message, + description + } + if (icon) { + data.icon = icon; + } + notification.open(data); + } + + render() { + const { snackbarOpen, snackbarText, snackbarHorizontal, snackbarVertical } = this.state; + + + return ( + + this.handleSnackbarClose()} + transition={Fade} + SnackbarContentProps={{ + 'aria-describedby': 'message-id', + }} + resumeHideDuration={2000} + message={{this.state.snackbarText}} + /> + + + + + ) + } + } + } } \ No newline at end of file diff --git a/public/react/src/modules/courses/Resource/Fileslistitem.js b/public/react/src/modules/courses/Resource/Fileslistitem.js index a2f57a8e1..1af027757 100644 --- a/public/react/src/modules/courses/Resource/Fileslistitem.js +++ b/public/react/src/modules/courses/Resource/Fileslistitem.js @@ -26,7 +26,8 @@ class Fileslistitem extends Component{ }) this.props.Settingtypes(discussMessage.id) } - showfiles=()=>{ + showfiles=(value)=>{ + let {discussMessage,coursesId}=this.props let file_id=discussMessage.id let url="/files/"+file_id+"/histories.json" @@ -35,12 +36,14 @@ class Fileslistitem extends Component{ course_id:coursesId }, }).then((result)=>{ + if(result.data.attachment_histories.length===0){ let link = document.createElement('a'); document.body.appendChild(link); link.href = result.data.url; - link.download = result.data.title; + console.log(value) + link.download = value; //兼容火狐浏览器 let evt = document.createEvent("MouseEvents"); evt.initEvent("click", false, false); @@ -203,25 +206,21 @@ class Fileslistitem extends Component{ { this.props.isAdmin ? this.showfiles(discussMessage.title)} title={discussMessage.title} className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.title} : "" } { this.props.isStudent? this.showfiles(discussMessage.title)} title={discussMessage.title} className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.title} :"" } { - this.props.isNotMember ? discussMessage.is_lock === true ? + this.props.isNotMember ? {discussMessage.title} - : - {discussMessage.title} :"" + :"" } diff --git a/public/react/src/modules/courses/Resource/index.js b/public/react/src/modules/courses/Resource/index.js index 1ad136934..6501716b7 100644 --- a/public/react/src/modules/courses/Resource/index.js +++ b/public/react/src/modules/courses/Resource/index.js @@ -954,8 +954,8 @@ class Fileslists extends Component{ } } > -
+
+

暂无数据哦~

diff --git a/public/react/src/modules/courses/exercise/Ecerciseallbackagain.js b/public/react/src/modules/courses/exercise/Ecerciseallbackagain.js index f0a65a467..f593232d2 100644 --- a/public/react/src/modules/courses/exercise/Ecerciseallbackagain.js +++ b/public/react/src/modules/courses/exercise/Ecerciseallbackagain.js @@ -1,230 +1,230 @@ -import React,{ Component } from "react"; -import { Modal,Checkbox,notification} from "antd"; -import axios from 'axios'; - -class Ecerciseallbackagain extends Component{ - constructor(props){ - super(props); - this.state={ - data:undefined, - limit:10, - page:1, - datalist:undefined, - group_ids:undefined - } - } - componentDidMount() { - - let url="/exercises/"+this.props.match.params.Id+"/redo_modal.json"; - - axios.get(url,{params:{ - limit:10, - page:1, - } - }).then((response) => { - - this.setState({ - data:response.data, - datalist:response.data.exercise_users - }) - }).catch((error) => { - this.props.callback() - console.log(error) - }); - - - } - - //勾选实训 - shixunhomeworkedit=(checkedValues)=>{ - let{datalist}=this.state; - if(checkedValues.length===datalist.length){ - this.setState({ - onChangetype:true, - group_ids:checkedValues - }) - }else{ - this.setState({ - group_ids:checkedValues, - onChangetype:false - }) - } - } - - contentViewScroll=(e)=>{ - //滑动到底判断 - if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){ - let {page,limit,datalist}=this.state; - let newpage=page+1; - let newdata=datalist; - - let url="/exercises/"+this.props.match.params.Id+"/redo_modal.json"; - - axios.get(url,{params:{ - limit:limit, - page:newpage, - } - }).then((response) => { - - response.data.exercise_users.map((item,key)=>{ - newdata.push(item) - }) - this.setState({ - datalist:newdata, - page:newpage - }) - }).catch((error) => { - console.log(error) - }); - - } - } - - onChange=(e)=>{ - let{datalist}=this.state; - if(e.target.checked===true){ - let id=[] - datalist.map((item,key)=>{ - id.push(item.user_id) - }) - - this.setState({ - group_ids:id, - onChangetype:e.target.checked - }) - }else{ - this.setState({ - group_ids:[], - onChangetype:e.target.checked - }) - } - } - - isSave=()=>{ - let{group_ids}=this.state; - if(group_ids===undefined||group_ids.length===0){ - notification.open({ - message:"提示", - description:"请先选择学生" - }); - return - } - let url="/exercises/"+this.props.match.params.Id+"/redo_exercise.json"; - axios.post(url, { - user_ids: group_ids, - }) - .then((response) => { - if (response.data.status === 0) { - this.props.callback(1) - notification.open({ - message:"提示", - description:response.data.message - }); - } - // else if(response.data.status === -1){ - // notification.open({ - // message: '参数错误', - // }); - // }else if(response.data.status === -2){ - // notification.open({ - // message: '当前作业不支持查重', - // }); - // }else if(response.data.status === -3){ - // notification.open({ - // message: '正在查重中', - // }); - // }else if(response.data.status === -4){ - // notification.open({ - // message: '查重异常', - // }); - // } - }) - .catch(function (error) { - console.log(error); - }); - } - - issCancel=()=>{ - this.props.callback() - } - - render(){ - let {datalist,group_ids,onChangetype}=this.state; - - console.log() - return( -
- -
- - -
学生(仅限“提交中”)将得到一次重新答题的机会,现有的答题情况将被清空
-
    -
  • 姓名
  • -
  • 学号
  • -
  • 成绩
  • -
- - {datalist===undefined?"": -
    - - - { datalist.map((item,key)=>{ - return( -
    -
  • - - - -
  • -
  • - {item.student_id} -
  • -
  • - {item.user_score} -
  • -
    - ) - })} - -
    -
- } - -
- {onChangetype===true?"清除":"全选"} -
- -
- 取消 - 确认 -
- -
-
-
- ) - } -} +import React,{ Component } from "react"; +import { Modal,Checkbox,notification} from "antd"; +import axios from 'axios'; + +class Ecerciseallbackagain extends Component{ + constructor(props){ + super(props); + this.state={ + data:undefined, + limit:10, + page:1, + datalist:undefined, + group_ids:undefined + } + } + componentDidMount() { + + let url="/exercises/"+this.props.match.params.Id+"/redo_modal.json"; + + axios.get(url,{params:{ + limit:10, + page:1, + } + }).then((response) => { + + this.setState({ + data:response.data, + datalist:response.data.exercise_users + }) + }).catch((error) => { + this.props.callback() + console.log(error) + }); + + + } + + //勾选实训 + shixunhomeworkedit=(checkedValues)=>{ + let{datalist}=this.state; + if(checkedValues.length===datalist.length){ + this.setState({ + onChangetype:true, + group_ids:checkedValues + }) + }else{ + this.setState({ + group_ids:checkedValues, + onChangetype:false + }) + } + } + + contentViewScroll=(e)=>{ + //滑动到底判断 + if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){ + let {page,limit,datalist}=this.state; + let newpage=page+1; + let newdata=datalist; + + let url="/exercises/"+this.props.match.params.Id+"/redo_modal.json"; + + axios.get(url,{params:{ + limit:limit, + page:newpage, + } + }).then((response) => { + + response.data.exercise_users.map((item,key)=>{ + newdata.push(item) + }) + this.setState({ + datalist:newdata, + page:newpage + }) + }).catch((error) => { + console.log(error) + }); + + } + } + + onChange=(e)=>{ + let{datalist}=this.state; + if(e.target.checked===true){ + let id=[] + datalist.map((item,key)=>{ + id.push(item.user_id) + }) + + this.setState({ + group_ids:id, + onChangetype:e.target.checked + }) + }else{ + this.setState({ + group_ids:[], + onChangetype:e.target.checked + }) + } + } + + isSave=()=>{ + let{group_ids}=this.state; + if(group_ids===undefined||group_ids.length===0){ + notification.open({ + message:"提示", + description:"请先选择学生" + }); + return + } + let url="/exercises/"+this.props.match.params.Id+"/redo_exercise.json"; + axios.post(url, { + user_ids: group_ids, + }) + .then((response) => { + if (response.data.status === 0) { + this.props.callback(1) + notification.open({ + message:"提示", + description:response.data.message + }); + } + // else if(response.data.status === -1){ + // notification.open({ + // message: '参数错误', + // }); + // }else if(response.data.status === -2){ + // notification.open({ + // message: '当前作业不支持查重', + // }); + // }else if(response.data.status === -3){ + // notification.open({ + // message: '正在查重中', + // }); + // }else if(response.data.status === -4){ + // notification.open({ + // message: '查重异常', + // }); + // } + }) + .catch(function (error) { + console.log(error); + }); + } + + issCancel=()=>{ + this.props.callback() + } + + render(){ + let {datalist,group_ids,onChangetype}=this.state; + + console.log() + return( +
+ +
+ + +
学生将得到一次重新答题的机会,现有的答题情况将被清空
+
    +
  • 姓名
  • +
  • 学号
  • +
  • 成绩
  • +
+ + {datalist===undefined?"": +
    + + + { datalist.map((item,key)=>{ + return( +
    +
  • + + + +
  • +
  • + {item.student_id} +
  • +
  • + {item.user_score} +
  • +
    + ) + })} + +
    +
+ } + +
+ {onChangetype===true?"清除":"全选"} +
+ +
+ 取消 + 确认 +
+ +
+
+
+ ) + } +} export default Ecerciseallbackagain; \ No newline at end of file diff --git a/public/react/src/modules/courses/exercise/ExerciseListItem.js b/public/react/src/modules/courses/exercise/ExerciseListItem.js index f11509fc8..8ffd16937 100644 --- a/public/react/src/modules/courses/exercise/ExerciseListItem.js +++ b/public/react/src/modules/courses/exercise/ExerciseListItem.js @@ -107,11 +107,9 @@ class ExerciseListItem extends Component{ } { - this.props.isNotMember()? item.lock_status === 0 ? + this.props.isNotMember()? {item.exercise_name} - : - - {item.exercise_name}:"" + :"" } { diff --git a/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js b/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js index 31c293659..b9f0f67f9 100644 --- a/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js +++ b/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js @@ -1,5 +1,5 @@ import React,{ Component } from "react"; -import {Checkbox,Radio, Input,InputNumber} from "antd"; +import {Checkbox,Radio, Input,InputNumber,Spin} from "antd"; import '../css/members.css' import '../css/busyWork.css' @@ -75,7 +75,10 @@ class ExerciseReviewAndAnswer extends Component{ Id:undefined, // 试卷总分 - exerciseTotalScore:undefined + exerciseTotalScore:undefined, + + // 加载效果 + isSpin:false } } componentDidUpdate (prevProps) { @@ -163,7 +166,8 @@ class ExerciseReviewAndAnswer extends Component{ getInfo=()=>{ this.setState({ courseName:this.props.current_user.course_name, - userName:this.props.current_user.username + userName:this.props.current_user.username, + isSpin:true }) let eId=this.props.match.params.Id; @@ -187,7 +191,8 @@ class ExerciseReviewAndAnswer extends Component{ exercise_questions:result.data.exercise_questions, user_exercise_status:1, Id:result.data.exercise_answer_user.user_id, - exerciseTotalScore:result.data.exercise_answer_user.score + exerciseTotalScore:result.data.exercise_answer_user.score, + isSpin:false }) } }).catch((error)=>{ @@ -210,7 +215,8 @@ class ExerciseReviewAndAnswer extends Component{ exercise_questions:result.data.exercise_questions, user_exercise_status:result.data.exercise.user_exercise_status, time:result.data.exercise.left_time, - exerciseTotalScore:result.data.user_score + exerciseTotalScore:result.data.user_score, + isSpin:false }) if(result.data.exercise.left_time != null){ this.remainTime(); @@ -498,7 +504,8 @@ class ExerciseReviewAndAnswer extends Component{ ModalCancel, ModalSave, Loadtype, - exerciseTotalScore + exerciseTotalScore, + isSpin }=this.state let isAdmin = this.props.isAdmin(); let isStudent =this.props.isStudent(); @@ -506,6 +513,7 @@ class ExerciseReviewAndAnswer extends Component{ console.log(data&&data.exercise.user_name) return(
+
{ - isNotMember && discussMessage.private_icon===true ? - {discussMessage.name}: - this.toDetailPage(`${discussMessage.id}`)} className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name} + isNotMember? + {discussMessage.name}:"" + } { isStudent? this.toDetailPage(`${discussMessage.id}`)} className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}:"" } - + { + isAdmin? this.toDetailPage(`${discussMessage.id}`)} className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}:"" + } { discussMessage.private_icon===true? diff --git a/public/react/src/modules/courses/graduation/topics/index.js b/public/react/src/modules/courses/graduation/topics/index.js index 391bcac18..8ed3118b9 100644 --- a/public/react/src/modules/courses/graduation/topics/index.js +++ b/public/react/src/modules/courses/graduation/topics/index.js @@ -352,8 +352,8 @@ onBoardsNew=()=>{ ( {/* 参考普通作业 - 题库选用 */} {/* this.useFromBank()}>题库选用 正式版没有,先隐藏*/} + < a href={`/api/courses/${this.props.match.params.coursesId}/graduation_topics/export.xlsx`} className={"fl color-blue mr30 font-16"}>导出

- < a href={`/api/courses/${this.props.match.params.coursesId}/graduation_topics/export.xlsx`} className={"color-blue mr20 font-16"}>导出 this.onBoardsNew()}>新建
):"" } diff --git a/public/react/src/modules/courses/poll/PollDetailTabForth.js b/public/react/src/modules/courses/poll/PollDetailTabForth.js index 3dff2bc87..e0cca8716 100644 --- a/public/react/src/modules/courses/poll/PollDetailTabForth.js +++ b/public/react/src/modules/courses/poll/PollDetailTabForth.js @@ -187,56 +187,6 @@ class PollDetailTabForth extends Component{ } UnifiedSetting=()=>{ let { unit_e_tip , unit_p_tip , publish_time , end_time ,course_group }=this.state - // 如果两个时间都没有填写或者只选择了截止时间则先保存设置然后弹出立即发布弹框 - // if ( !publish_time ){ - // if(moment(end_time,dataformat)<=moment()){ - // this.setState({ - // unit_e_tip:"截止时间不能小于当前时间" - // }) - // }else{ - // this.setState({ - // unit_e_tip:"" - // }) - - // let list=[]; - // let pollId=this.props.match.params.pollId; - // let coursesId=this.props.match.params.coursesId; - // let url=`/courses/${coursesId}/polls/publish_modal.json`; - // axios.get(url,{ - // params:{ - // check_ids:[pollId] - // } - // }).then((response) => { - // if(response.data.course_info){ - // for(var i=0;i 0 ? 1 : 2, - // visible:true, - // Topval:"本操作只对“未发布”的对象生效", - // Botvalleft:"暂不发布", - // Botval:"则通过后续手动设置,定时发布", - // starttime:"发布时间:"+this.props.getNowFormatDates(1), - // endtime:"截止时间:" + moment(end_time || this.props.getNowFormatDates(2)).format(dataformat), - // Cancelname:"暂不发布", - // Savesname:"立即发布", - // Cancel:this.homeworkhide, - // Saves:this.homeworkstartend, - // publishCourse:list, - // publish_time:this.props.getNowFormatDates(1) - // }) - // } - // }).catch((error)=>{ - // console.log(error); - // }) - - // } - // } if( this.state.un_change_unified == false){ if ( !publish_time ){ this.setState({ @@ -275,16 +225,16 @@ class PollDetailTabForth extends Component{ unit_e_tip:"" }) } - this.commitSetting((result)=>{ - if(result.status==200){ - this.props.showNotification(`${result.data.message}`); - this.getSettingInfo(); - this.setState({ - flagPageEdit:false - }) - } - }) } + this.commitSetting((result)=>{ + if(result.status==200){ + this.props.showNotification(`${result.data.message}`); + this.getSettingInfo(); + this.setState({ + flagPageEdit:false + }) + } + }) } // 非统一设置提交 diff --git a/public/react/src/modules/courses/poll/PollDetailTabThird.js b/public/react/src/modules/courses/poll/PollDetailTabThird.js index c3994c7c0..d322c9544 100644 --- a/public/react/src/modules/courses/poll/PollDetailTabThird.js +++ b/public/react/src/modules/courses/poll/PollDetailTabThird.js @@ -8,7 +8,7 @@ import './pollStyle.css' import axios from 'axios'; -const map={1:"单选题",2:"多选题",3:"主观题"} +const map={1:"单选题",2:"多选题",3:"主观题",4:"主观题"} class PollDetailTabThird extends Component{ constructor(props){ super(props); diff --git a/public/react/src/modules/courses/poll/PollListItem.js b/public/react/src/modules/courses/poll/PollListItem.js index 8c1d814ed..16770ce43 100644 --- a/public/react/src/modules/courses/poll/PollListItem.js +++ b/public/react/src/modules/courses/poll/PollListItem.js @@ -60,7 +60,7 @@ class PollListItem extends Component{ } { item.polls_status ==1 && item.publish_time ==null && item.created_at && - 创建于{moment(item.created_at).format(dataformat)} + 创建于{moment(item.created_at).fromNow()} } { item.polls_status ==1 && item.publish_time !=null && diff --git a/public/react/src/modules/courses/poll/PollNew.js b/public/react/src/modules/courses/poll/PollNew.js index 0316cd8fe..63143c59a 100644 --- a/public/react/src/modules/courses/poll/PollNew.js +++ b/public/react/src/modules/courses/poll/PollNew.js @@ -2763,7 +2763,17 @@ class PollNew extends Component {
- : "" + : +
+ + this.deleteadddom(indexo)}>取消 + this.deleteadddomthree(indexo, itemo)}>保存 + this.deleteadddomtwo(indexo, itemo)}>保存并继续 + +
) : itemo.question.question_type === 3 ? diff --git a/public/react/src/modules/courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js index d697694cb..5dd049441 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworks.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworks.js @@ -4,6 +4,7 @@ import {WordsBtn, ActionBtn} from 'educoder'; import TraineetraininginformationModal from './TraineetraininginformationModal'; import ModulationModal from "../coursesPublic/ModulationModal"; import HomeworkModal from "../coursesPublic/HomeworkModal"; +import {Base64} from 'js-base64'; import { Form, Select, @@ -32,7 +33,6 @@ import moment from 'moment'; import 'moment/locale/zh-cn'; import {getImageUrl, toPath} from 'educoder'; import ShixunWorkModal from './Shixunworkdetails/ShixunWorkModal'; - const Search = Input.Search; const RadioGroup = Radio.Group; const CheckboxGroup = Checkbox.Group; @@ -115,6 +115,7 @@ class Listofworks extends Component { key: 'name', align: 'center', className:'font-14', + width:'120px', render: (text, record) => ( {record.name} ) @@ -139,7 +140,7 @@ class Listofworks extends Component { dataIndex: 'classroom', align: 'center', className:'font-14', - width:'288px', + width:"260px", render: (text, record) => ( {record.classroom} ) @@ -239,9 +240,9 @@ class Listofworks extends Component { : - + -- - + ) : ( {record.name} ) @@ -391,7 +393,7 @@ class Listofworks extends Component { dataIndex: 'classroom', align: 'center', className:'font-14', - width:'288px', + width:"260px", render: (text, record) => ( {record.classroom} ) @@ -491,9 +493,9 @@ class Listofworks extends Component { : - + -- - + ) : { console.log("internshipreport"); - // params: { - // homework_common_id: homeworkid, - // work_status: this.state.course_groupyslstwo, - // course_group: this.state.checkedValuesineinfo, - // search: this.state.searchtext, - // } - // let url = "/zip/shixun_report"; - // let homeworkid = this.props.match.params.homeworkid; + var struy=""; + try { + struy = moment().format('YYYY-MM-DD')+"-"+moment().format('hh-mm'); + struy=struy.replace(/-/g,""); + }catch (e) { + console.log(1347); + console.log(e); + } + axios.get((url),{responseType: 'blob'}).then((response) => { console.log("1350"); console.log(response); - if(response.data.status&&response.data.status===-1){ + if(response.status&&response.status===-1){ - }else if(response.data.status&&response.data.status===-2){ + }else if(response.status&&response.status===-2){ }else{ // window.location.href("/api"+url); - console.log("开始下载zip文件") + // console.log("开始下载zip文件") const type='application/zip'//ZIP文件 const blob = new Blob([response.data], { type: type }) const downloadElement = document.createElement('a') const href = window.URL.createObjectURL(blob) - //后台再header中传文件名 - const name = decodeURI(response.headers['content-disposition'].split('=')[1]) + const string = Base64.decode(response.headers['content-disposition'].split('=')[1]); + console.log(response.headers['content-disposition'].split('=')[1]); downloadElement.href = href - downloadElement.download = name + downloadElement.download = string+struy+".zip" document.body.appendChild(downloadElement) downloadElement.click() document.body.removeChild(downloadElement) // 下载完成移除元素 @@ -1377,38 +1380,38 @@ class Listofworks extends Component { // 课堂学生成绩的导出下载 Classstudentachievement=(url)=>{ console.log("Classstudentachievement"); - // const course_id = this.props.match.params.coursesId; - // let url = "/courses/"+course_id+"/export_member_scores_excel.xlsx"; - // ,{ - // params: { - // group_id: this.state.checkedValuesineinfo, - // search: this.state.searchtext, - // } - // },{responseType: 'blob'}) + // console.log(); + var struy=""; + try { + struy = moment().format('YYYY-MM-DD')+"-"+moment().format('hh-mm'); + struy=struy.replace(/-/g,""); + }catch (e) { + console.log(1397); + console.log(e); + } + + axios.get((url),{responseType: 'blob'}).then((response) => { console.log("1374"); console.log(response); - if(response.data.status&&response.data.status===-1){ + if(response.status&&response.status===-1){ - }else if(response.data.status&&response.data.status===-2){ + }else if(response.status&&response.status===-2){ }else{ const type='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' //excel文件 const blob = new Blob([response.data], { type: type }) const downloadElement = document.createElement('a') const href = window.URL.createObjectURL(blob) - //后台再header中传文件名 - const name = decodeURI(response.headers['content-disposition'].split('=')[1]) + const string = Base64.decode(response.headers['content-disposition'].split('=')[1]); console.log(response.headers['content-disposition'].split('=')[1]); - console.log(name); downloadElement.href = href - downloadElement.download = name + downloadElement.download =string+struy+".xlsx"; document.body.appendChild(downloadElement) downloadElement.click() document.body.removeChild(downloadElement) // 下载完成移除元素 window.URL.revokeObjectURL(href) // 释放掉blob对象 - } }).catch((error) => { console.log(error) @@ -1512,7 +1515,7 @@ class Listofworks extends Component { typelist={teacherdata === undefined ? [""] : teacherdata.homework_status} /> 返回 + href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id===undefined?"": jobsettingsdata.data.category.category_id}`}>返回 实训详情 @@ -1565,6 +1568,7 @@ class Listofworks extends Component { :""} {this.props.isAdmin() ? diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index ed87ecc0d..4e9cb3e00 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -1005,7 +1005,7 @@ class Listofworksstudentone extends Component { > {jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_name} + to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id === undefined ? "" : jobsettingsdata.data.category.category_id}`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_name} > 作业详情

diff --git a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js index ea554c208..3ac1b0bd2 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js @@ -21,7 +21,8 @@ import { DatePicker, Radio, Tooltip, - notification + notification, + Pagination } from "antd"; import {Link, Switch, Route, Redirect} from 'react-router-dom'; import axios from 'axios'; @@ -31,6 +32,7 @@ import '../css/Courses.css' import './style.css' import moment from 'moment'; import 'moment/locale/zh-cn'; +import {Base64} from 'js-base64'; const Search = Input.Search; const CheckboxGroup = Checkbox.Group; @@ -89,11 +91,22 @@ class ShixunStudentWork extends Component { }) } - getupdata=()=>{ + getupdata=(pages)=>{ + let {order,b_order,page,limit,group_infolist,search}=this.state; var homeworkid = this.props.match.params.homeworkid; let url = "/homework_commons/" + homeworkid + "/code_review_results.json"; - axios.get(url).then((response) => { + axios.get(url,{params:{ + order:order, + sort:b_order, + page:pages===undefined?page:pages, + limit:limit, + group_ids:group_infolist, + search:search + }, + paramsSerializer: function(params) { + return qs.stringify(params, {arrayFormat: 'brackets'}) + }}).then((response) => { if (response.data.status === undefined || response.data.status === 0) { if(response.data!=undefined){ if(response.data.status!=-2){ @@ -198,12 +211,12 @@ class ShixunStudentWork extends Component { } - TablePagination = (e) => { + TablePagination = (pages) => { this.setState({ - page:e.current + page:pages }) - + this.getupdata(pages) } inputSearchValue=(e)=>{ @@ -443,7 +456,91 @@ class ShixunStudentWork extends Component { starttimes:undefined, }) } +// 导出实习报告批量 + internshipreport = (url) => { + console.log("internshipreport"); + // var homeworkid = this.props.match.params.homeworkid; + // let url = "/zip/shixun_report"; + axios.get(url).then((response) => { + console.log("326"); + console.log(response); + if(response.data.status&&response.data.status===-1){ + + + }else if(response.data.status&&response.data.status===-2){ + + }else{ + const type='application/zip'//ZIP文件 + const blob = new Blob([response.data], { type: type }) + const downloadElement = document.createElement('a') + const href = window.URL.createObjectURL(blob) + //后台再header中传文件名 + // console.log(Base64.decode(response.headers['content-disposition'].split('=')[1])); + const string = Base64.decode(response.headers['content-disposition'].split('=')[1]); + downloadElement.href = href + var now=""; + try { + now = moment().year()+""+(moment().month()+1)+""+moment().date()+""+moment().hour()+""+moment().minute()+"" + console.log(now); + + } catch (e) { + console.log("1376"); + } + downloadElement.download = string+now+".zip" + document.body.appendChild(downloadElement) + downloadElement.click() + document.body.removeChild(downloadElement) // 下载完成移除元素 + window.URL.revokeObjectURL(href) // 释放掉blob对象 + } + + }).catch((error) => { + console.log(error) + }); + } + + // 课堂学生成绩的导出下载 + Classstudentachievement = (url) => { + console.log("Classstudentachievement"); + // const course_id = this.props.match.params.coursesId; + // let url = "/courses/" + course_id + "/export_member_scores_excel.xlsx"; + axios.get(url).then((response) => { + console.log("1374"); + console.log(response); + if(response.data.status&&response.data.status===-1){ + + }else if(response.data.status&&response.data.status===-2){ + + }else{ + const type='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' //excel文件 + const blob = new Blob([response.data], { type: type }) + const downloadElement = document.createElement('a') + const href = window.URL.createObjectURL(blob) + //后台再header中传文件名 + // console.log("1409"); + // console.log(Base64.decode(response.headers['content-disposition'].split('=')[1])); + const string = Base64.decode(response.headers['content-disposition'].split('=')[1]); + var now=""; + try { + now = moment().year()+""+(moment().month()+1)+""+moment().date()+""+moment().hour()+""+moment().minute()+"" + console.log("1422"); + console.log(now); + + } catch (e) { + console.log("1432"); + } + downloadElement.href = href + downloadElement.download =string+now+".xlsx"; + document.body.appendChild(downloadElement) + downloadElement.click() + document.body.removeChild(downloadElement) // 下载完成移除元素 + window.URL.revokeObjectURL(href) // 释放掉blob对象 + + } + }).catch((error) => { + console.log(error) + }); + } render() { let { @@ -606,10 +703,35 @@ class ShixunStudentWork extends Component { 设置 - {this.props.isAdmin() ? 导出 : ""} + + {this.props.isAdmin() ?
  • + 导出 + +
  • : ""} {this.props.isAdmin()? data&&data.end_immediately===true? 立即截止 : "" : ""} @@ -751,30 +873,33 @@ class ShixunStudentWork extends Component {
    + + .ant-spin-nested-loading > div > .ant-spin .ant-spin-dot { + top: 72%;} + } + `} {datalist === undefined ? "" : } - + :""} + + + { + datalist === undefined ? "":datalist.length<11? +
    + +
    + : "" + } - - - - + diff --git a/public/react/src/modules/courses/shixunHomework/ShixunWorkDetails.js b/public/react/src/modules/courses/shixunHomework/ShixunWorkDetails.js index 205fbd9e7..4cfdccab0 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunWorkDetails.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunWorkDetails.js @@ -63,8 +63,9 @@ class ShixunWorkDetails extends Component { render() { let{data}=this.state; return ( - - {data===undefined? "":
    + +
    + {data===undefined? "":
    @@ -111,11 +112,9 @@ class ShixunWorkDetails extends Component { />
    - - -
    -
    } + } +
    ) } diff --git a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js index d120ec5ad..9c6ea2421 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js @@ -17,7 +17,9 @@ import '../css/members.css'; import "../common/formCommon.css"; import '../css/Courses.css'; import './style.css'; - +import moment from 'moment'; +import 'moment/locale/zh-cn'; +import {Base64} from 'js-base64'; class ShixunWorkReport extends Component { @@ -28,7 +30,47 @@ class ShixunWorkReport extends Component { spinning:true } } + // 导出实习报告批量 + internshipreport = (url) => { + console.log("internshipreport"); + // var homeworkid = this.props.match.params.homeworkid; + // let url = "/zip/shixun_report"; + axios.get(url).then((response) => { + console.log("326"); + console.log(response); + if(response.data.status&&response.data.status===-1){ + + + }else if(response.data.status&&response.data.status===-2){ + }else{ + const type='application/zip'//ZIP文件 + const blob = new Blob([response.data], { type: type }) + const downloadElement = document.createElement('a') + const href = window.URL.createObjectURL(blob) + //后台再header中传文件名 + // console.log(Base64.decode(response.headers['content-disposition'].split('=')[1])); + const string = Base64.decode(response.headers['content-disposition'].split('=')[1]); + downloadElement.href = href + var now=""; + try { + now = moment().year()+""+(moment().month()+1)+""+moment().date()+""+moment().hour()+""+moment().minute()+"" + console.log(now); + + } catch (e) { + console.log("1376"); + } + downloadElement.download = string+now+".zip" + document.body.appendChild(downloadElement) + downloadElement.click() + document.body.removeChild(downloadElement) // 下载完成移除元素 + window.URL.revokeObjectURL(href) // 释放掉blob对象 + } + + }).catch((error) => { + console.log(error) + }); + } componentDidMount() { this.setState({ spinning:true @@ -93,9 +135,7 @@ class ShixunWorkReport extends Component { {/*{this.props.isAdmin()?导出实训报告数据:""}*/} {this.props.isAdmin() ? this.internshipreport(`/zip/shixun_report?homework_common_id=${homeworkid}`)} >导出实训报告数据 : ""} diff --git a/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js b/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js index d6c96182b..3a2366848 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js @@ -304,11 +304,9 @@ class ShixunhomeWorkItem extends Component{ } { - this.props.isNotMember?this.props.discussMessage.private_icon===true? + this.props.isNotMember? {discussMessage.name} - : - {discussMessage.name}:"" + :"" } diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index 8e857199b..f7f7c80e5 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -4,6 +4,7 @@ import HomeworkModal from "../coursesPublic/HomeworkModal"; import {WordsBtn, ActionBtn, handleDateString} from 'educoder'; import PollDetailTabForthRules from '../poll/PollDetailTabForthRules'; import ShixunWorkModal from './Shixunworkdetails/ShixunWorkModal'; +import {Base64} from 'js-base64'; import { Button, Checkbox, @@ -24,6 +25,7 @@ import './style.css'; import '../css/busyWork.css' import '../poll/pollStyle.css' import moment from 'moment'; +import 'moment/locale/zh-cn'; import Modals from "../../modals/Modals"; const RadioGroup = Radio.Group; @@ -1621,7 +1623,27 @@ class Trainingjobsetting extends Component { }else if(response.data.status&&response.data.status===-2){ }else{ - window.open("/api"+url, '_blank'); + const type='application/zip'//ZIP文件 + const blob = new Blob([response.data], { type: type }) + const downloadElement = document.createElement('a') + const href = window.URL.createObjectURL(blob) + //后台再header中传文件名 + // console.log(Base64.decode(response.headers['content-disposition'].split('=')[1])); + const string = Base64.decode(response.headers['content-disposition'].split('=')[1]); + downloadElement.href = href + var now=""; + try { + now = moment().year()+""+(moment().month()+1)+""+moment().date()+""+moment().hour()+""+moment().minute()+"" + console.log(now); + + } catch (e) { + console.log("1376"); + } + downloadElement.download = string+now+".zip" + document.body.appendChild(downloadElement) + downloadElement.click() + document.body.removeChild(downloadElement) // 下载完成移除元素 + window.URL.revokeObjectURL(href) // 释放掉blob对象 } }).catch((error) => { @@ -1643,7 +1665,29 @@ class Trainingjobsetting extends Component { }else if(response.data.status&&response.data.status===-2){ }else{ - window.open("/api"+url, '_blank'); + const type='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' //excel文件 + const blob = new Blob([response.data], { type: type }) + const downloadElement = document.createElement('a') + const href = window.URL.createObjectURL(blob) + //后台再header中传文件名 + // console.log("1409"); + // console.log(Base64.decode(response.headers['content-disposition'].split('=')[1])); + const string = Base64.decode(response.headers['content-disposition'].split('=')[1]); + var now=""; + try { + now = moment().year()+""+(moment().month()+1)+""+moment().date()+""+moment().hour()+""+moment().minute()+"" + console.log("1422"); + console.log(now); + + } catch (e) { + console.log("1432"); + } + downloadElement.href = href + downloadElement.download =string+now+".xlsx"; + document.body.appendChild(downloadElement) + downloadElement.click() + document.body.removeChild(downloadElement) // 下载完成移除元素 + window.URL.revokeObjectURL(href) // 释放掉blob对象 } }).catch((error) => { diff --git a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js index 8d88e9fb5..5137351d2 100644 --- a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js +++ b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js @@ -23,7 +23,9 @@ import { notification } from "antd"; import {Link, Switch, Route, Redirect} from 'react-router-dom'; -import moment from 'moment' +import moment from 'moment'; +import 'moment/locale/zh-cn'; +import {Base64} from 'js-base64'; import axios from 'axios'; import '../css/members.css' import "../common/formCommon.css" @@ -332,7 +334,27 @@ class Workquestionandanswer extends Component { }else if(response.data.status&&response.data.status===-2){ }else{ - window.open("/api"+url, '_blank'); + const type='application/zip'//ZIP文件 + const blob = new Blob([response.data], { type: type }) + const downloadElement = document.createElement('a') + const href = window.URL.createObjectURL(blob) + //后台再header中传文件名 + // console.log(Base64.decode(response.headers['content-disposition'].split('=')[1])); + const string = Base64.decode(response.headers['content-disposition'].split('=')[1]); + downloadElement.href = href + var now=""; + try { + now = moment().year()+""+(moment().month()+1)+""+moment().date()+""+moment().hour()+""+moment().minute()+"" + console.log(now); + + } catch (e) { + console.log("1376"); + } + downloadElement.download = string+now+".zip" + document.body.appendChild(downloadElement) + downloadElement.click() + document.body.removeChild(downloadElement) // 下载完成移除元素 + window.URL.revokeObjectURL(href) // 释放掉blob对象 } }).catch((error) => { @@ -354,7 +376,29 @@ class Workquestionandanswer extends Component { }else if(response.data.status&&response.data.status===-2){ }else{ - window.open("/api"+url, '_blank'); + const type='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' //excel文件 + const blob = new Blob([response.data], { type: type }) + const downloadElement = document.createElement('a') + const href = window.URL.createObjectURL(blob) + //后台再header中传文件名 + // console.log("1409"); + // console.log(Base64.decode(response.headers['content-disposition'].split('=')[1])); + const string = Base64.decode(response.headers['content-disposition'].split('=')[1]); + var now=""; + try { + now = moment().year()+""+(moment().month()+1)+""+moment().date()+""+moment().hour()+""+moment().minute()+"" + console.log("1422"); + console.log(now); + + } catch (e) { + console.log("1432"); + } + downloadElement.href = href + downloadElement.download =string+now+".xlsx"; + document.body.appendChild(downloadElement) + downloadElement.click() + document.body.removeChild(downloadElement) // 下载完成移除元素 + window.URL.revokeObjectURL(href) // 释放掉blob对象 } }).catch((error) => { diff --git a/public/react/src/modules/courses/shixunHomework/shixunHomework.js b/public/react/src/modules/courses/shixunHomework/shixunHomework.js index 9bf0d12a4..42f5fbf6a 100644 --- a/public/react/src/modules/courses/shixunHomework/shixunHomework.js +++ b/public/react/src/modules/courses/shixunHomework/shixunHomework.js @@ -1132,7 +1132,7 @@ class ShixunHomework extends Component{ {course_modules&&course_modules.main_category.map((item,key)=>{ return( - datas&&datas.category_id===null?"":
  • this.moveTos(item.main_category_id)}>{item.main_category_name}
  • :"" + datas&&datas.category_id===null?"":
  • this.moveTos(item.main_category_id)}>{item.main_category_name}
  • ) })} diff --git a/public/react/src/modules/login/LoginDialog.js b/public/react/src/modules/login/LoginDialog.js index 9bcd35a1d..36a9530b9 100644 --- a/public/react/src/modules/login/LoginDialog.js +++ b/public/react/src/modules/login/LoginDialog.js @@ -317,10 +317,13 @@ class LoginDialog extends Component { }); } handleDialogClose() { - this.setState({ - isRender: false - }) - // window.location.href="/"; + if(this.props.match.path==="/"){ + this.setState({ + isRender: false + }) + }else{ + window.location.href="/"; + } } loginEDU=()=>{ diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 251f608ca..e31603f3c 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -613,6 +613,7 @@ submittojoinclass=(value)=>{ {/* isRender&& isRender === true?*/} {/* :""*/} {/*}*/} diff --git a/public/react/src/modules/tpm/challengesnew/TPMquestion.js b/public/react/src/modules/tpm/challengesnew/TPMquestion.js index aba4743d9..60840b81f 100644 --- a/public/react/src/modules/tpm/challengesnew/TPMquestion.js +++ b/public/react/src/modules/tpm/challengesnew/TPMquestion.js @@ -14,7 +14,11 @@ import './css/TPMchallengesnew.css'; import {getUrl} from 'educoder'; -import TPMeditorMD from './editorMD'; +import TpmQuestionMain from './TpmQuestionMain'; + +import TpmQuestionNew from './TpmQuestionNew'; + +import TpmQuestionEdit from './TpmQuestionEdit'; let origin = getUrl(); @@ -31,127 +35,15 @@ for (var i = 65, j = 0; i < 91; i++, j++) { letterArr[j] = String.fromCharCode(i); } -// 恢复数据 -function md_rec_data(k,mdu,id, editor){ - if(window.sessionStorage.getItem(k+mdu) !== null){ - editor.setValue(window.sessionStorage.getItem(k+mdu)); - md_clear_data(k,mdu,id); - } -} - -// 保存数据 -function md_add_data(k,mdu,d){ - window.sessionStorage.setItem(k+mdu,d); -} - -// 清空保存的数据 -function md_clear_data(k,mdu,id){ - window.sessionStorage.removeItem(k+mdu); - var id1 = "#e_tip_"+id; - var id2 = "#e_tips_"+id; - if(k == 'content'){ - $(id2).html(""); - }else{ - $(id1).html(""); - } -} - -function md_elocalStorage(editor,mdu,id){ - - if (window.sessionStorage){ - var oc = window.sessionStorage.getItem('content'+mdu); - if(oc !== null ){ - // console.log("#e_tips_"+id) - $("#e_tips_"+id).data('editor', editor); - var h = '您上次有已保存的数据,是否恢复 ? / 不恢复'; - $("#e_tips_"+id).html(h); - } - setInterval(function() { - var d = new Date(); - var h = d.getHours(); - var m = d.getMinutes(); - var s = d.getSeconds(); - h = h < 10 ? '0' + h : h; - m = m < 10 ? '0' + m : m; - s = s < 10 ? '0' + s : s; - if(editor.getValue().trim() != ""){ - md_add_data("content",mdu,editor.getValue()); - var id1 = "#e_tip_"+id; - var id2 = "#e_tips_"+id; - - $(id1).html(" 数据已于 " + h + ':' + m + ':' + s +" 保存 "); - $(id2).html(""); - } - },10000); - - }else{ - $("#e_tip_"+id).after('您的浏览器不支持localStorage.无法开启自动保存草稿服务,请升级浏览器!'); - } -} - -function create_editorMD(id, width, high, placeholder, imageUrl,initValue, callback) { - var editorName = window.editormd(id, { - width: width, - height: high, - path: path, // "/editormd/lib/" - markdown : initValue, - syncScrolling: "single", - tex: true, - tocm: true, - emoji: true, - taskList: true, - codeFold: true, - searchReplace: true, - htmlDecode: "style,script,iframe", - sequenceDiagram: true, - autoFocus: false, - placeholder: placeholder, - toolbarIcons: function () { - // Or return editormd.toolbarModes[name]; // full, simple, mini - // Using "||" set icons align right. - return ["bold", "italic", "|", "list-ul", "list-ol", "|", "code", "code-block", "|", "testIcon", "testIcon1", '|', "image", "table", '|', "watch", "clear"] - }, - toolbarCustomIcons: { - testIcon: "
    ", - testIcon1: "
    " - }, - //这个配置在simple.html中并没有,但是为了能够提交表单,使用这个配置可以让构造出来的HTML代码直接在第二个隐藏的textarea域中,方便post提交表单。 - saveHTMLToTextarea: true, - // 用于增加自定义工具栏的功能,可以直接插入HTML标签,不使用默认的元素创建图标 - dialogMaskOpacity: 0.6, - imageUpload: true, - imageFormats: ["jpg", "jpeg", "gif", "png", "bmp", "webp", "JPG", "JPEG", "GIF", "PNG", "BMP", "WEBP"], - imageUploadURL: imageUrl,//url - onload: function () { - // this.previewing(); - $("#" + id + " [type=\"latex\"]").bind("click", function () { - editorName.cm.replaceSelection("```latex"); - editorName.cm.replaceSelection("\n"); - editorName.cm.replaceSelection("\n"); - editorName.cm.replaceSelection("```"); - var __Cursor = editorName.cm.getDoc().getCursor(); - editorName.cm.setCursor(__Cursor.line - 1, 0); - }); - - $("#" + id + " [type=\"inline\"]").bind("click", function () { - editorName.cm.replaceSelection("$$$$"); - var __Cursor = editorName.cm.getDoc().getCursor(); - editorName.cm.setCursor(__Cursor.line, __Cursor.ch - 2); - editorName.cm.focus(); - }); - $("[type=\"inline\"]").attr("title", "行内公式"); - $("[type=\"latex\"]").attr("title", "多行公式"); - - callback && callback() - } - }); - return editorName; -} - export default class TPMquestion extends Component { constructor(props) { super(props) + this.contentMdRef = React.createRef(); + this.newquestioMDMdRef = React.createRef(); + this.newquestioMDMdCont=React.createRef(); + this.neweditanswerRef=React.createRef(); + this.editanswersRef=React.createRef(); this.state = { choice_url: undefined, practice_url: undefined, @@ -159,7 +51,7 @@ export default class TPMquestion extends Component { position: undefined, task_pass_default: undefined, submit_url: undefined, - questionInputvalue:undefined, + questionsInputvalue:undefined, questionaddsum:0, questionaddarray:[], questionaddtype:true, @@ -193,157 +85,14 @@ export default class TPMquestion extends Component { sumittype:false } } -questioMD=(initValue, id)=> { - - this.contentChanged = false; - const placeholder = "请输入选择题的过关任务内容"; -// amp; -// 编辑时要传memoId - // const imageUrl = `/upload_with_markdown?container_id=&container_type=Memo`; - const imageUrl = `/api/attachments.json`; -// 创建editorMd - - let questio_editormd = create_editorMD(id, '100%', 400, placeholder, imageUrl, initValue,() => { - setTimeout(() => { - questio_editormd.resize() - questio_editormd.cm && questio_editormd.cm.refresh() - }, 500) - - if (initValue != undefined) { - questio_editormd.setValue(initValue) - } - questio_editormd.cm.on("change", (_cm, changeObj) => { - console.log('....contentChanged') - this.contentChanged = true; - }) - }); - md_elocalStorage(questio_editormd, `MemoQuestion_${id}`, `${id}Question`); - this.questio_editormd = questio_editormd; - window.questio_editormd = questio_editormd; - -} - -newanswerMD=(initValue, id)=> { - this.contentChanged = false; -// amp; -// 编辑时要传memoId - const imageUrl = `/api/attachments.json`; -// 创建editorMd - - let newanswerMD_editormd = create_editorMD(id, '100%', 400, "请输入各个选项的具体解析或其他相关信息", imageUrl, initValue,() => { - setTimeout(() => { - newanswerMD_editormd.resize() - newanswerMD_editormd.cm && newanswerMD_editormd.cm.refresh() - }, 500) - - if (initValue != undefined) { - newanswerMD_editormd.setValue(initValue) - } - newanswerMD_editormd.cm.on("change", (_cm, changeObj) => { - console.log('....contentChanged') - this.contentChanged = true; - }) - }); - - md_elocalStorage(newanswerMD_editormd, `MemoQuestion_${id}`, `${id}Question`); - - this.newanswerMD_editormd = newanswerMD_editormd; - window.newanswerMD_editormd = newanswerMD_editormd; - -} - -newquestioMD=(initValue, id)=>{ - this.contentChanged = false; -// amp; -// 编辑时要传memoId - const imageUrl = `/api/attachments.json`; -// 创建editorMd - - let newquestioMD_editormd = create_editorMD(id, '100%', 400, "请输入选择题的题干内容", imageUrl, initValue,() => { - setTimeout(() => { - newquestioMD_editormd.resize() - newquestioMD_editormd.cm && newquestioMD_editormd.cm.refresh() - }, 500) - - if (initValue != undefined) { - newquestioMD_editormd.setValue(initValue) - } - newquestioMD_editormd.cm.on("change", (_cm, changeObj) => { - console.log('....contentChanged') - this.contentChanged = true; - }) - }); - md_elocalStorage(newquestioMD_editormd, `MemoQuestion_${id}`, `${id}Question`); - this.newquestioMD_editormd = newquestioMD_editormd; - window.newquestioMD_editormd = newquestioMD_editormd; - -} - -editanswerMD=(initValue, id)=> { - - this.contentChanged = false; - const placeholder = ""; -// amp; -// 编辑时要传memoId - const imageUrl = `/api/attachments.json`; -// 创建editorMd - - const neweditanswer_editormd =create_editorMD(id, '100%', 400, "请输入选择题的题干内容", imageUrl, initValue,()=> { - setTimeout(() => { - neweditanswer_editormd.resize() - neweditanswer_editormd.cm && neweditanswer_editormd.cm.refresh() - }, 500) - - if (initValue != undefined) { - neweditanswer_editormd.setValue(initValue) - } - neweditanswer_editormd.cm.on("change", (_cm, changeObj) => { - console.log('....contentChanged') - this.contentChanged = true; - }) - }); - md_elocalStorage(neweditanswer_editormd, `MemoQuestion_${id}`, `${id}Question`); - this.neweditanswer_editormd = neweditanswer_editormd; - window.neweditanswer_editormd = neweditanswer_editormd; - -} - -editanswersMD=(initValue, id)=> { - - this.contentChanged = false; - const placeholder = ""; -// amp; -// 编辑时要传memoId - const imageUrl = `/api/attachments.json`; -// 创建editorMd - - const editanswersMD_editormd = create_editorMD(id, '100%', 400, "请输入各个选项的具体解析或其他相关信息", imageUrl, initValue,() => { - setTimeout(() => { - editanswersMD_editormd.resize() - editanswersMD_editormd.cm && editanswersMD_editormd.cm.refresh() - }, 500) - - if (initValue != undefined) { - editanswersMD_editormd.setValue(initValue) - } - editanswersMD_editormd.cm.on("change", (_cm, changeObj) => { - console.log('....contentChanged') - this.contentChanged = true; - }) - }); - md_elocalStorage(editanswersMD_editormd, `MemoQuestion_${id}`, `${id}Question`); - this.editanswersMD_editormd = editanswersMD_editormd; - window.editanswersMD_editormd = editanswersMD_editormd; - -} - //_______________________________________________________________________________ questionInputvalue=(e)=>{ this.setState({ - questionInputvalue: e.target.value + questionsInputvalue: e.target.value }) } + componentDidMount() { if(this.props.status===2){ @@ -380,18 +129,15 @@ editanswersMD=(initValue, id)=> { }) if (response.data.status === 403||response.data.status === 401||response.data.status === 500) { - this.questioMD("", "questioMD"); - this.setState({ - questioMD:"" + contentMdRefval:"" }) } else { - this.questioMD("", "questioMD"); - // this.create_mackdown(response.data.task_pass_default, "questioMD","") this.setState({ - questioMD:response.data.task_pass_default + contentMdRefval:response.data.task_pass_default }) + this.contentMdRef.current.setValue(response.data.task_pass_default || '') } this.shixunsautoHeight() } @@ -404,13 +150,6 @@ editanswersMD=(initValue, id)=> { //编辑模式 let url = "/shixuns/"+ id +"/challenges/"+checkpointId+"/edit.json?st=1" axios.get(url).then((response) => { - // if(choose_idlist!=undefined){ - // - // for(var i=0; i { activetype:"first", prev_challenge:newprev_challenge, next_challenge:next_challenge, - questionInputvalue:response.data.subject, + questionsInputvalue:response.data.subject, questionaddarray:response.data.chooses, challenge_id:response.data.id, mancheckpointId:checkpointId, @@ -449,11 +188,15 @@ editanswersMD=(initValue, id)=> { answer:response.data.answer }) - this.questioMD(response.data.task_pass, "questioMD"); + + this.setState({ + contentMdRefval:response.data.task_pass + }) + this.contentMdRef.current.setValue(response.data.task_pass || '') if(response.data.chooses.length===0){ this.questionadd() } - // this.create_mackdown(response.data.task_pass, "questioMD","","questio_editormd") + this.shixunsautoHeight() } @@ -472,13 +215,6 @@ editanswersMD=(initValue, id)=> { let id = this.props.match.params.shixunId; let url = "/shixuns/"+ id +"/challenges/"+checkpointId+"/edit.json?st=1" axios.get(url).then((response) => { - // if(choose_idlist!=undefined){ - // - // for(var i=0; i { newquestionaddtype:false, prev_challenge:newprev_challenge, next_challenge:next_challenge, - questionInputvalue:response.data.subject, + questionsInputvalue:response.data.subject, questionaddarray:response.data.chooses, challenge_id:response.data.id, mancheckpointId:checkpointId, @@ -515,11 +251,14 @@ editanswersMD=(initValue, id)=> { questioMD:response.data.task_pass, }) - this.questioMD(response.data.task_pass, "questioMD"); + + this.setState({ + contentMdRefval:response.data.task_pass + }) + this.contentMdRef.current.setValue(response.data.task_pass || '') if(response.data.chooses.length===0){ this.questionadd() } - // this.create_mackdown(response.data.task_pass, "questioMD","","questio_editormd") this.shixunsautoHeight() } @@ -549,12 +288,13 @@ editanswersMD=(initValue, id)=> { challenge_choose_id:this.props.match.params.choose_id, standard_answer:response.data.standard_answer, subject:response.data.subject, - answer:response.data.answer + answer:response.data.answer, + neweditanswerRefval:response.data.subject, + editanswersRefval:response.data.answer, }) - this.editanswerMD(response.data.subject, "neweditanswer") - - this.editanswersMD(response.data.answer, "editanswers") + this.neweditanswerRef.current.setValue(response.data.subject||'') + this.editanswersRef.current.setValue(response.data.answer||'') this.shixunsautoHeight() } @@ -578,11 +318,12 @@ editanswersMD=(initValue, id)=> { }) return } - let {questionInputvalue} =this.state; - const exercise_editormdvalue = this.questio_editormd.getValue(); + let {questionsInputvalue} =this.state; + // const exercise_editormdvalue = this.questio_editormd.getValue(); + const exercise_editormdvalue = this.contentMdRef.current.getValue().trim(); let id = this.props.match.params.shixunId; - if(questionInputvalue===undefined||questionInputvalue===null||questionInputvalue===""){ + if(questionsInputvalue===undefined||questionsInputvalue===null||questionsInputvalue===""){ this.setState({ questionInputvaluetype:true }) @@ -614,7 +355,7 @@ editanswersMD=(initValue, id)=> { axios.post(url, { identifier:id, - subject: questionInputvalue, + subject: questionsInputvalue, task_pass: exercise_editormdvalue, st: 1 }).then((response) => { @@ -637,7 +378,7 @@ editanswersMD=(initValue, id)=> { let url ="/shixuns/"+id+"/challenges/"+checkpointId+".json"; axios.put(url, { tab:0, - subject: questionInputvalue, + subject: questionsInputvalue, task_pass: exercise_editormdvalue, }).then((response) => { if(response.data.status===1){ @@ -659,13 +400,12 @@ editanswersMD=(initValue, id)=> { } questionall=()=>{ - let {task_pass_default}=this.state; this.setState({ activetype:"first", newquestionaddtype:false, - editquestionaddtype:false + editquestionaddtype:false, + questionaddtype:false }) - this.questioMD(task_pass_default, "questioMD"); } questionadd=()=>{ $('html').animate({ @@ -675,11 +415,21 @@ editanswersMD=(initValue, id)=> { let questionaddsums=questionaddarray.length; - if(questionaddarray.length-1>9){ + if(questionaddsums-1>9){ + this.props.showSnackbar("选择题目最大支持设置9道题") return } let questionaddarrays=questionaddarray; + + questionaddarrays.map((item,key)=>{ + if(item.choose_id===0){ + questionaddarrays.splice(key,1) + } + }) + + + questionaddarrays.push({type:0,choose_id:0}); this.setState({ activetype:0, @@ -692,14 +442,19 @@ editanswersMD=(initValue, id)=> { answeoptions:[10,20], answeonshixunsmark:10, shixunssanswerkillvalue:"", - shixunsskillanswerlist:[] + shixunsskillanswerlist:[], + contentMdRefval:"", + newquestioMDMdContval:"" }) - this.newanswerMD("","challenge_choose_answer") - this.newquestioMD("","newquestioMDs") - // this.create_mackdown("", "newquestioMDs","请输入选择题的题干内容","newanswerMD_editormd") - // this.create_mackdown("", "challenge_choose_answer","请输入各个选项的具体解析或其他相关信息","newquestioMD_editormd") - this.shixunsautoHeight() + + // setTimeout(() => { + // this.newquestioMDMdCont.current.setValue('') + // this.newquestioMDMdRef.current.setValue('') + // + // }, 2000) + + this.shixunsautoHeight() } editquestionlists=(newquestionlists)=>{ @@ -834,7 +589,6 @@ editanswersMD=(initValue, id)=> { } answer_subit=(sumtype,challenge_choose_id)=>{ - let {challenge_id,questionlists,shixunsskillanswerlist,answeonshixunsmark,answeshixunsGroup,questionaddarray} =this.state; if(challenge_id===undefined){ message.error("关卡id为空"); @@ -924,9 +678,7 @@ editanswersMD=(initValue, id)=> { let id = this.props.match.params.shixunId; let url; if(sumtype==="edit"){ - let newquestioMDvalue = this.neweditanswer_editormd.getValue(); - - + let newquestioMDvalue = this.neweditanswerRef.current.getValue().trim(); if(newquestioMDvalue===""||newquestioMDvalue==="请输入选择题的题干内容"){ this.setState({ newquestioMDvaluetype:true, @@ -938,21 +690,13 @@ editanswersMD=(initValue, id)=> { return } - let newnewanswerMDvalue = this.editanswersMD_editormd.getValue(); + + let newnewanswerMDvalue = this.editanswersRef.current.getValue().trim(); console.log(newnewanswerMDvalue) if(newnewanswerMDvalue===""||newnewanswerMDvalue===" "){ newnewanswerMDvalue=newlist } - // if(newnewanswerMDvalue===""||newnewanswerMDvalue==="请输入选择题的题干内容"){ - // this.setState({ - // newquestioMDvaluetypes:true, - // }) - // $('html').animate({ - // scrollTop:1300 - // }, 200); - // this.props.showSnackbar("参考答案为空"); - // return - // } + url="/shixuns/" + id + "/challenges/" + challenge_id + "/update_choose_question.json?choose_id="+challenge_choose_id; axios.post(url, { challenge_choose: {subject: newquestioMDvalue, answer: newnewanswerMDvalue, standard_answer:newlist, score: answeonshixunsmark, difficult: answeshixunsGroup}, @@ -976,8 +720,8 @@ editanswersMD=(initValue, id)=> { console.log(error) }); }else{ - let newquestioMDvalue = this.newquestioMD_editormd.getValue(); + let newquestioMDvalue = this.newquestioMDMdRef.current.getValue().trim(); if(newquestioMDvalue===""||newquestioMDvalue==="请输入选择题的题干内容"){ this.setState({ newquestioMDvaluetype:true, @@ -988,19 +732,8 @@ editanswersMD=(initValue, id)=> { message.error("题干为空"); return } - let newnewanswerMDvalue = this.newanswerMD_editormd.getValue(); - // - // if(newnewanswerMDvalue===""||newnewanswerMDvalue==="请输入选择题的题干内容"){ - // this.setState({ - // newquestioMDvaluetypes:true, - // }) - // - // $('html').animate({ - // scrollTop:1300 - // }, 200); - // this.props.showSnackbar("参考答案为空"); - // return - // } + let newnewanswerMDvalue = this.newquestioMDMdCont.current.getValue().trim(); + if(newnewanswerMDvalue===""||newnewanswerMDvalue===" "){ newnewanswerMDvalue=newlist } @@ -1042,39 +775,7 @@ editanswersMD=(initValue, id)=> { } - // getanswer_subitlist=()=>{ - // let{challenge_choose_id,challenge_id,questionaddarray} =this.state - // let id = this.props.match.params.shixunId; - // let url ='/shixuns/'+id+'/challenges/'+challenge_id+'/edit_choose_question.json?choose_id='+challenge_choose_id; - // axios.get(url).then((response) => { - // if(response.status===200){ - // this.create_mackdown(response.data.subject, "neweditanswer","","neweditanswer_editormd") - // this.create_mackdown(response.data.standard_answer, "editanswers","","editanswersMD_editormd") - // let choose_contents=response.data.choose_contents; - // let newchoose_contentslist=[] - // for(var i=0; i { - // }); - // } - questionlist=(key,challenge_choose_id,type)=>{ - $('html').animate({ scrollTop:10 }, 500); @@ -1083,8 +784,9 @@ editanswersMD=(initValue, id)=> { if(challenge_choose_id===""||type===0){ - this.newanswerMD("","neweditanswer") - this.editanswersMD("","editanswers") + + // this.neweditanswerRef.current.setValue('') + // this.editanswersRef.current.setValue('') this.setState({ activetype:challenge_choose_id, editquestionaddtype:true, @@ -1095,12 +797,11 @@ editanswersMD=(initValue, id)=> { answeoptions:[10,20], answeonshixunsmark:10, shixunssanswerkillvalue:"", - shixunsskillanswerlist:[] + shixunsskillanswerlist:[], + neweditanswerRefval:'', + editanswersRefval:'' }) - // this.create_mackdown("", "newquestioMDs","请输入选择题的题干内容","newanswerMD_editormd") - // this.create_mackdown("", "challenge_choose_answer","请输入各个选项的具体解析或其他相关信息","newquestioMD_editormd") - }else{ let id = this.props.match.params.shixunId; let url ='/shixuns/'+id+'/challenges/'+challenge_id+'/edit_choose_question.json?choose_id='+challenge_choose_id; @@ -1125,13 +826,13 @@ editanswersMD=(initValue, id)=> { challenge_choose_id:challenge_choose_id, standard_answer:response.data.standard_answer, subject:response.data.subject, - answer:response.data.answer + answer:response.data.answer, + neweditanswerRefval:response.data.subject, + editanswersRefval:response.data.subject }) - this.editanswerMD(response.data.subject, "neweditanswer") - - this.editanswersMD(response.data.answer, "editanswers") - + this.neweditanswerRef.current.setValue(response.data.subject||'') + this.editanswersRef.current.setValue(response.data.answer||'') this.shixunsautoHeight() } @@ -1152,9 +853,7 @@ editanswersMD=(initValue, id)=> { if(elem.scrollHeight===0){ elem.style.height = 62 + 'px'; }else{ - // if(elem.style.height>140){ - // - // } + elem.style.height = elem.scrollHeight + 'px'; } @@ -1170,56 +869,30 @@ editanswersMD=(initValue, id)=> { } gochooseid=(url)=>{ - window.location.href =url - } - onshixunsmarks=()=> { - this.setState({ - marktype:true - }) + window.location.href =url + // this.props.history.replace( url ); + // this.props.history.push( url ); + // 返回 + // this.props.history.goBack(); } - onshixunsmarkss=()=> { - this.setState({ - marktype:false - }) - } render() { let {choice_url, practice_url, go_back_url, position, - questionInputvalue, - challenge_tagtype, - questionInputvaluetype, - answeshixunsGroup, answeoptions, - answeonshixunsmark, - shixunssanswerkillvalue, - questionlistss,power, questionaddarray, questionaddtype, activetype, newquestionaddtype, - newquestioMDvaluetype, editquestionaddtype, - questionlists, - shixunsskillanswerlist, - newcnttype, challenge_choose_id, - mancheckpointId, - challenge_id, - questioMD, - standard_answer, - subject, - newquestioMDvaluetypes, - questionInputvaluetypes, prev_challenge, next_challenge, - newcnttypesum, - marktype, answer, - sumittype + } = this.state; let options; @@ -1230,7 +903,6 @@ editanswersMD=(initValue, id)=> { ) }) - console.log(answer) return (
    @@ -1261,9 +933,11 @@ editanswersMD=(initValue, id)=> {
    -
  • - 本关任务 -
  • + +
  • + 本关任务 +
  • +
    { questionaddarray.length===0?"":questionaddarray.map((item,key)=>{ @@ -1277,7 +951,7 @@ editanswersMD=(initValue, id)=> { item.choose_id!=0? this.gochooseid("/shixuns/"+this.props.match.params.shixunId+"/challenges/"+this.props.match.params.checkpointId+"/editquestion"+"/"+item.choose_id)}> {key+1}.{item.type===2?"多选题":item.type===1?"单选题":'选择题'} - :{key+1}.{item.type===2?"多选题":item.type===1?"单选题":'选择题'} + :activetype==="first"?"":{key+1}.{item.type===2?"多选题":item.type===1?"单选题":'选择题'} } @@ -1295,458 +969,57 @@ editanswersMD=(initValue, id)=> {
    -
    - -
    -
    -

    任务名称

    -
    - * -
    - -
    -
    - 必填项 -
    -
    -
    -
    - - -
    -

    过关任务

    -
    - * -
    -
    - -
    -
    -
    - {/**/} -
    -
    - 必填项 -
    -
    -

    -

    -
    - - -
    4||this.props.identity===undefined||power===false?"none":"block"}}> - 提交 - 取消 - -
    - -
    + {/*x选择题首页*/} + {activetype==="first"?this.questionInputvalue(e)} + clickquestionsumit={(e)=>this.clickquestionsumit(e)} + />:""} {/*新建*/} - {newquestionaddtype===true?
    - -
    -
    -

    题干

    -
    - * -
    -
    - {/**/} - {/*
    */} - {/*
    */} - {/**/} -
    - -
    - - -
    - 必填项 -
    - -
    -

    -

    - - -
    - { - questionlists===undefined||questionlists.length===0?"":questionlists.map((item,key)=>{ - return( -
  • - - - this.delquestionlists(key)}> - - - - - -
  • - ) - }) - } -

    - 新增选项 - - - {newcnttypesum===0?"请选择答案":"选项内容不能为空"} - -

    -
  • - - -
  • -
    -
    -
    - - -
    -
    -

    参考答案

    -
    -
    - {/**/} - {/*
    */} - {/*
    */} -
    - -
    - 必填项 -
    -
    -

    -

    - -
    -
    - -
    -

    难度系数

    -
    - - - 简单 - 中等 - 困难 - - -
    -

    奖励经验值

    -
    - * - - - -

    - 如果学员答题错误,则不能得到相应的经验值
    - 如果学员成功得到经验值,那么将同时获得等值的金币奖励,如:+10经验值、+10金币 -

    - - 必填项 -
    -
    - -
    -

    技能标签

    -
    - * -
    - - {/*+ 添加*/} -
    学员答题正确将获得技能,否则不能获得技能 - - 必填项 - -
    -
    - - { - shixunsskillanswerlist.length === 0 ? "" : shixunsskillanswerlist.map((itme, key) => { - return ( -
  • {itme} - this.delshixunssnswerllist(key)}>× -
  • - ) - }) - } - - -
    - -
    - -
    -
    - - -
    4||this.props.identity===undefined||power===false?"none":"block"}}> - 提交 - 取消 -
    - -
    :""} + {newquestionaddtype===true? + this.selquestionlists(key)} + onInputoquestionption={(e,key)=>this.onInputoquestionption(e,key)} + delquestionlists={(key)=>this.delquestionlists(key)} + addquestionlists={(e)=>this.addquestionlists(e)} + onshixunGroupanswe={(e)=>this.onshixunGroupanswe(e)} + onshixunsansweSelect={(e)=>this.onshixunsansweSelect(e)} + shixunssanswerkill={(e)=>this.shixunssanswerkill(e)} + clickshixunsanswerskill={(e)=>this.clickshixunsanswerskill(e)} + delshixunssnswerllist={(key)=>this.delshixunssnswerllist(key)} + answer_subit={()=>this.answer_subit()} + />:""} {/*修改*/} - {editquestionaddtype===true?
    - -
    -
    -

    题干

    -
    - * -
    -
    - -
    -
    -
    -
    - - -
    - 必填项 -
    - -
    -

    -

    -
    - { - questionlists===undefined||questionlists.length===0?"":questionlists.map((item,key)=>{ - return( -
  • - - - this.delquestionlists(key)}> - - -
  • - ) - }) - } -

    - 新增选项 - - - {newcnttypesum===0?"请选择答案":"选项内容不能为空"} - -

    -
  • - - -
  • -
    -
    -
    - - -
    -
    -

    参考答案

    -
    -
    - {/**/} - {/*
    */} - {/*
    */} -
    -
    - 必填项 -
    -
    -

    -

    -
    -
    - -
    -

    难度系数

    -
    - - - 简单 - 中等 - 困难 - - -
    -

    奖励经验值

    -
    - * - - - -

    - 如果学员答题错误,则不能得到相应的经验值
    - 如果学员成功得到经验值,那么将同时获得等值的金币奖励,如:+10经验值、+10金币 -

    - - 必填项 -
    -
    - -
    -

    技能标签

    -
    - * -
    - - {/*+ 添加*/} -
    学员答题正确将获得技能,否则不能获得技能 - - 必填项 - -
    -
    - - { - shixunsskillanswerlist.length === 0 ? "" : shixunsskillanswerlist.map((itme, key) => { - return ( -
  • {itme} - this.delshixunssnswerllist(key)}>× -
  • - ) - }) - } - - -
    - -
    - -
    -
    - - -
    4||this.props.identity===undefined||power===false?"none":"block"}}> - this.answer_subit("edit",challenge_choose_id)}>提交 - 取消 -
    - -
    + {editquestionaddtype===true? + this.selquestionlists(key)} + onInputoquestionption={(e,key)=>this.onInputoquestionption(e,key)} + delquestionlists={(key)=>this.delquestionlists(key)} + addquestionlists={(e)=>this.addquestionlists(e)} + onshixunGroupanswe={(e)=>this.onshixunGroupanswe(e)} + onshixunsansweSelect={(e)=>this.onshixunsansweSelect(e)} + shixunssanswerkill={(e)=>this.shixunssanswerkill(e)} + clickshixunsanswerskill={(e)=>this.clickshixunsanswerskill(e)} + delshixunssnswerllist={(key)=>this.delshixunssnswerllist(key)} + answer_subit={()=>this.answer_subit("edit",challenge_choose_id)} + /> :""}
    @@ -1755,4 +1028,3 @@ editanswersMD=(initValue, id)=> { } } - diff --git a/public/react/src/modules/tpm/challengesnew/TpmQuestionEdit.js b/public/react/src/modules/tpm/challengesnew/TpmQuestionEdit.js new file mode 100644 index 000000000..7de8529d7 --- /dev/null +++ b/public/react/src/modules/tpm/challengesnew/TpmQuestionEdit.js @@ -0,0 +1,220 @@ +import React, {Component} from 'react'; + +import {Input, Select, Radio, Checkbox, Popconfirm, message, Modal,Tooltip} from 'antd'; + +import {BrowserRouter as Router, Route, Link, Switch} from "react-router-dom"; + +import TPMMDEditor from '../../tpm/challengesnew/TPMMDEditor'; + +const Option = Select.Option; + +const RadioGroup = Radio.Group; + +export default class TpmQuestionEdit extends Component { + constructor(props) { + super(props) + this.state = { + + } + } + + componentDidMount() { + + } + + + render() { + console.log( this.props.questionlists) + return ( +
    + +
    +
    +

    题干

    +
    + * +
    + +
    + + +
    + 必填项 +
    + +
    +

    +

    +
    + { + this.props.questionlists===undefined||this.props.questionlists.length===0?"":this.props.questionlists.map((item,key)=>{ + return( +
  • + + + this.props.delquestionlists(key)}> + + +
  • + ) + }) + } +

    + this.props.addquestionlists()} + className="fl edu-default-btn edu-greyline-btn mb20 option_icon_add">新增选项 + + + {this.props.newcnttypesum===0?"请选择答案":"选项内容不能为空"} + +

    +
  • + + +
  • +
    +
    +
    + + +
    +
    +

    参考答案

    +
    +
    + +
    +
    + 必填项 +
    +
    +

    +

    +
    +
    + +
    +

    难度系数

    +
    + + this.props.onshixunGroupanswe(e)}> + 简单 + 中等 + 困难 + + +
    +

    奖励经验值

    +
    + * + + + +

    + 如果学员答题错误,则不能得到相应的经验值
    + 如果学员成功得到经验值,那么将同时获得等值的金币奖励,如:+10经验值、+10金币 +

    + + 必填项 +
    +
    + +
    +

    技能标签

    +
    + * +
    + this.props.shixunssanswerkill(e)} + value={this.props.shixunssanswerkillvalue} + onPressEnter={(e)=>this.props.clickshixunsanswerskill(e)} + onBlur={(e)=>this.props.clickshixunsanswerskill(e)} + /> + {/*+ 添加*/} +
    学员答题正确将获得技能,否则不能获得技能 + + 必填项 + +
    +
    + + { + this.props.shixunsskillanswerlist.length === 0 ? "" : this.props.shixunsskillanswerlist.map((itme, key) => { + return ( +
  • {itme} + this.props.delshixunssnswerllist(key)}>× +
  • + ) + }) + } + + +
    + +
    + +
    +
    + + +
    4||this.props.identity===undefined||this.props.power===false?"none":"block"}}> + this.props.answer_subit()}>提交 + 取消 +
    + +
    + + ) + } +} + + + diff --git a/public/react/src/modules/tpm/challengesnew/TpmQuestionMain.js b/public/react/src/modules/tpm/challengesnew/TpmQuestionMain.js new file mode 100644 index 000000000..2de04f56a --- /dev/null +++ b/public/react/src/modules/tpm/challengesnew/TpmQuestionMain.js @@ -0,0 +1,84 @@ +import React, {Component} from 'react'; + +import {BrowserRouter as Router, Route, Link, Switch} from "react-router-dom"; +import TPMMDEditor from '../../tpm/challengesnew/TPMMDEditor'; + + +export default class TpmQuestionMain extends Component { + constructor(props) { + super(props) + this.state = { + + } + } + + componentDidMount() { + + } + + + render() { + return ( +
    +
    +
    +

    任务名称

    +
    + * +
    + +
    +
    + 必填项 +
    +
    +
    +
    + + +
    +

    过关任务

    +
    + * +
    + +
    +
    + 必填项 +
    +
    +

    +

    +
    + + +
    4 || this.props.identity === undefined || this.props.power === false ? "none" : "block"}}> + 提交 + 取消 + +
    + +
    + + ) + } + } + + + diff --git a/public/react/src/modules/tpm/challengesnew/TpmQuestionNew.js b/public/react/src/modules/tpm/challengesnew/TpmQuestionNew.js new file mode 100644 index 000000000..76a540e0c --- /dev/null +++ b/public/react/src/modules/tpm/challengesnew/TpmQuestionNew.js @@ -0,0 +1,225 @@ +import React, {Component} from 'react'; + +import {Input, Select, Radio, Checkbox, Popconfirm, message, Modal,Tooltip} from 'antd'; + +import {BrowserRouter as Router, Route, Link, Switch} from "react-router-dom"; + +import TPMMDEditor from '../../tpm/challengesnew/TPMMDEditor'; + +const Option = Select.Option; + +const RadioGroup = Radio.Group; + +export default class TpmQuestionNew extends Component { + constructor(props) { + super(props) + this.state = { + + } + } + + componentDidMount() { + + } + + + render() { + console.log( this.props.questionlists) + return ( +
    + +
    +
    +

    题干

    +
    + * +
    + +
    + + +
    + 必填项 +
    + +
    +

    +

    + + +
    + { + this.props.questionlists===undefined||this.props.questionlists.length===0?"":this.props.questionlists.map((item,key)=>{ + return( +
  • + + + this.props.delquestionlists(key)}> + + + + + +
  • + ) + }) + } +

    + this.props.addquestionlists()} + className="fl edu-default-btn edu-greyline-btn mb20 option_icon_add">新增选项 + + + {this.props.newcnttypesum===0?"请选择答案":"选项内容不能为空"} + +

    +
  • + + +
  • +
    +
    +
    + + +
    +
    +

    参考答案

    +
    +
    + +
    +
    + 必填项 +
    +
    +

    +

    + +
    +
    + +
    +

    难度系数

    +
    + + this.props.onshixunGroupanswe(e)} + > + 简单 + 中等 + 困难 + + +
    +

    奖励经验值

    +
    + * + + + +

    + 如果学员答题错误,则不能得到相应的经验值
    + 如果学员成功得到经验值,那么将同时获得等值的金币奖励,如:+10经验值、+10金币 +

    + + 必填项 +
    +
    + +
    +

    技能标签

    +
    + * +
    + this.props.shixunssanswerkill(e)} + value={this.props.shixunssanswerkillvalue} + onPressEnter={(e)=>this.props.clickshixunsanswerskill(e)} + onBlur={(e)=>this.props.clickshixunsanswerskill(e)} + /> + {/*+ 添加*/} +
    学员答题正确将获得技能,否则不能获得技能 + + 必填项 + +
    +
    + + { + this.props.shixunsskillanswerlist.length === 0 ? "" : this.props.shixunsskillanswerlist.map((itme, key) => { + return ( +
  • {itme} + this.props.delshixunssnswerllist(key)}>× +
  • + ) + }) + } + + +
    + +
    + +
    +
    + + +
    4||this.props.identity===undefined||this.props.power===false?"none":"block"}}> + 提交 + 取消 +
    + +
    + + ) + } +} + + + diff --git a/public/react/src/modules/tpm/challengesnew/css/TPMchallengesnew.css b/public/react/src/modules/tpm/challengesnew/css/TPMchallengesnew.css index 5087e2f0d..37a65ef97 100644 --- a/public/react/src/modules/tpm/challengesnew/css/TPMchallengesnew.css +++ b/public/react/src/modules/tpm/challengesnew/css/TPMchallengesnew.css @@ -60,21 +60,21 @@ a{ #exercisememoMD .CodeMirror { margin-top: 31px !important; - height: 658px !important; + height: 370px !important; /*width: 579px !important;*/ } #exercisememoMD .editormd-preview { top: 40px !important; - height: 700px !important; + height: 370px !important; width: 578px !important; } #exercisememoMD{ - height: 700px !important; + /*height: 700px !important;*/ } #questioMD{ /*width: 95% !important;*/ - height: 586px !important; + height: 417px !important; margin-left: 0% !important; } @@ -82,13 +82,13 @@ a{ #questioMD .CodeMirror { /*width: 550.5px !important;*/ margin-top: 31px !important; - height: 550px !important; + height: 374px !important; } #questioMD .editormd-preview { top: 40px !important; - height: 550px !important; - width: 578px !important; + height: 375px !important; + width: 550px !important; } #newquestioMD .CodeMirror { diff --git a/public/react/src/modules/user/AccountPage.js b/public/react/src/modules/user/AccountPage.js index 435d1e0d6..c61eed4c4 100644 --- a/public/react/src/modules/user/AccountPage.js +++ b/public/react/src/modules/user/AccountPage.js @@ -71,43 +71,44 @@ class AccountPage extends Component { return (
    - - - - - () - } - > - () - } - > + + +
    + + () + } + > + () + } + > - () - } - > + () + } + > - () - } - > + () + } + > - () - } - > - + () + } + > + +
    ); diff --git a/public/react/src/modules/user/account/AccountBasic.js b/public/react/src/modules/user/account/AccountBasic.js index e1d084cc4..831fd39ca 100644 --- a/public/react/src/modules/user/account/AccountBasic.js +++ b/public/react/src/modules/user/account/AccountBasic.js @@ -22,7 +22,7 @@ class AccountBasicEdit extends Component { const {basicInfo} =this.props const showRealName = false; return ( -
    +