diff --git a/public/react/config/webpack.config.prod.js b/public/react/config/webpack.config.prod.js index 596843f5f..fbfbf23bc 100644 --- a/public/react/config/webpack.config.prod.js +++ b/public/react/config/webpack.config.prod.js @@ -326,7 +326,7 @@ module.exports = { comments: false }, compress: { - drop_debugger: false, + drop_debugger: true, drop_console: false } } diff --git a/public/react/src/common/UrlTool.js b/public/react/src/common/UrlTool.js index c9a1a2c58..bc463e662 100644 --- a/public/react/src/common/UrlTool.js +++ b/public/react/src/common/UrlTool.js @@ -31,6 +31,22 @@ export function getUrl(path, goTest) { // testbdweb.educoder.net testbdweb.trustie.net // const local = goTest ? 'https://testeduplus2.educoder.net' : 'http://localhost:3000' // const local = 'https://testeduplus2.educoder.net' + const local = 'https://test-newweb.educoder.net' + if (isDev) { + return `${local}${path?path:''}` + } + return `${path ? path: ''}`; +} + +export function getUrlmys(path, goTest) { + // https://www.educoder.net + // https://testbdweb.trustie.net + + // 如果想所有url定位到测试版,可以反注释掉下面这行 + //goTest = true + // testbdweb.educoder.net testbdweb.trustie.net + // const local = goTest ? 'https://testeduplus2.educoder.net' : 'http://localhost:3000' + // const local = 'https://testeduplus2.educoder.net' const local = 'https://test-jupyterweb.educoder.net' if (isDev) { return `${local}${path?path:''}` @@ -57,7 +73,7 @@ export function getUploadActionUrl(path, goTest) { } export function getUploadActionUrltwo(id) { - return `${getUrl()}/api/shixuns/${id}/upload_data_sets.json${isDev ? `?debug=${window._debugType || 'admin'}` : ''}` + return `${getUrlmys()}/api/shixuns/${id}/upload_data_sets.json${isDev ? `?debug=${window._debugType || 'admin'}` : ''}` } export function getUploadActionUrlOfAuth(id) { return `${getUrl()}/api/users/accounts/${id}/auth_attachment.json${isDev ? `?debug=${window._debugType || 'admin'}` : ''}` diff --git a/public/react/src/common/educoder.js b/public/react/src/common/educoder.js index 1eae620c1..c9aa7ac77 100644 --- a/public/react/src/common/educoder.js +++ b/public/react/src/common/educoder.js @@ -2,7 +2,7 @@ // export { default as OrderStateUtil } from '../routes/Order/components/OrderStateUtil'; -export { getImageUrl as getImageUrl, getUrl as getUrl, getUrl2 as getUrl2, setImagesUrl as setImagesUrl +export { getImageUrl as getImageUrl, getUrl as getUrl, getUrlmys as getUrlmys, getUrl2 as getUrl2, setImagesUrl as setImagesUrl , getUploadActionUrl as getUploadActionUrl,getUploadActionUrltwo as getUploadActionUrltwo , getUploadActionUrlOfAuth as getUploadActionUrlOfAuth , getTaskUrlById as getTaskUrlById, TEST_HOST ,htmlEncode as htmlEncode } from './UrlTool'; export { default as queryString } from './UrlTool2'; diff --git a/public/react/src/modules/tpm/TPMDataset.js b/public/react/src/modules/tpm/TPMDataset.js index 717219057..a966eee50 100644 --- a/public/react/src/modules/tpm/TPMDataset.js +++ b/public/react/src/modules/tpm/TPMDataset.js @@ -9,6 +9,7 @@ import axios from 'axios'; import './tpmmodel/tpmmodel.css' import {getUploadActionUrltwo,appendFileSizeToUploadFileAll} from 'educoder'; import moment from 'moment'; +import Tpmdatasetmodel from "./tpmmodel/Tpmdatasetmodel"; const confirm = Modal.confirm; @@ -82,6 +83,7 @@ class TPMDataset extends Component { selectedRowKeysdata:[], loadingstate:false, checked: false, + showmodel:false, } } @@ -287,6 +289,9 @@ class TPMDataset extends Component { return className; } handleChange = (info) => { + console.log("handleChange123123"); + console.log(info); +debugger if(info.file.status == "done" || info.file.status == "uploading" || info.file.status === 'removed'){ let fileList = info.fileList; this.setState({ @@ -296,6 +301,15 @@ class TPMDataset extends Component { //done 成功就会调用这个方法 this.getdatas(); } + if(info.file.response){ + if(info.file.response.status===-1||info.file.response.status==="-1"){ + this.setState({ + showmodel:true, + tittest:info.file.response.message, + }) + } + } + } } @@ -395,6 +409,17 @@ class TPMDataset extends Component { } + ModalCancel = () => { + this.setState({ + showmodel: false, + }) + } + + ModalSave=()=>{ + this.setState({ + showmodel: false, + }) + } render() { const {tpmLoading, shixun, user, match} = this.props; @@ -438,7 +463,11 @@ class TPMDataset extends Component { return (
- + { + this.state.showmodel===true? + + :"" + }
{ + this.props.modalCancel() + } + + + + + render() { + + return( + +
+

文件名重复

+

{this.props.tittest}

+ +
+
+ ) + } +} + +export default Tpmdatasetmodel; diff --git a/public/react/src/modules/tpm/tpmmodel/common.css b/public/react/src/modules/tpm/tpmmodel/common.css new file mode 100644 index 000000000..db37f3406 --- /dev/null +++ b/public/react/src/modules/tpm/tpmmodel/common.css @@ -0,0 +1,278 @@ +/*.login_register_content, .login_register_content .ant-tabs-tabpane {*/ +/* !*display: flex;*!*/ +/* justify-content: center;*/ +/*}*/ +.login_register_content .ant-input { + background:rgb(244,244,244); +} +.login_register_content .loginInputzhucheyslass{ + border:1px solid red !important; +} +.login_register_content .loginInputzhucheyslass:hover{ + border:1px solid red !important; +} +.login_register_content { + width: 434px; + box-shadow:3px 10px 21px 0px rgba(76,76,76,0.15); + border-radius:6px; + background: #fff; +} + .login_register_content .ant-tabs-ink-bar { + width: 21px !important; + left: 19px; + } + .login_register_content .ant-tabs { + width: 354px; + } + + .login_section { + width: 100%; + display:flex; + justify-content: center; + align-items: center; + flex-direction: column; + } +.login_sectionysl{ + width: 100%; + display:flex; + align-items: center; + flex-direction: column; +} + .loginInput { + width: 100%; + margin-bottom: 16px; + height: 45px; + } + + .educouddiv { + display: flex; + flex-direction: column; + } + + + .left_right { + width: 100%; + display: flex; + justify-content: space-between; + } + .login_btn { + width: 100%; + margin-top: 26px; + margin-bottom: 26px; + } + .dragValidator { + margin-bottom: 16px; + } + .ysldivhome1{ + display: flex; + flex-direction: row; + margin-left: 100px; + margin-right: 129px; + } + .ysldivhome2{ + width: 800px; + display: flex; + flex-flow: row wrap; + align-content:stretch; + } + .ysldivhomediv{ + width: 101px; + } + .ysldivhomediv1{ + width: 17%; + height: 100px; + border-radius:50%; + box-shadow:3px 10px 21px 0px rgba(76,76,76,0.15); + background: #fff; + display: flex; + flex-direction:column; + margin-left: 6.5%; + margin-top: 1%; + } +.ysldivhomediv2{ + width: 17%; + height: 100px; + border-radius:50%; + box-shadow:3px 10px 21px 0px rgba(76,76,76,0.15); + background: #fff; + display: flex; + flex-direction:column; + margin-left: 6.5%; + margin-top: 3%; +} + .ysldivhomedivtxt{ + width:86%; + height:27px; + margin-bottom: 5px; + font-size: 14px; + text-align: center; + + } + .ysldivhomedivimgsy{ + + } + .ysldivhomedivimg{ + width: 80%; + } + .ysllogin_register_contents{ + display: flex; + justify-content: center; + + } + .ysllogin_section { + display: flex; + align-items: center; + flex-direction: column; + box-shadow:3px 10px 21px 0px rgba(76,76,76,0.15); + border-radius:6px; + background: #fff; + } + .yslspans1{ + text-align: center; + font-size: 13px; + color: #111C24; + } + .yslspans2{ + text-align: center; + font-size: 13px; + color: #05101A; + margin-top: 1%; + } + .yslspans3{ + text-align: center; + font-size: 12px; + color: #656565; + } + .yslbutton{ + width:255px; + height: 36px; + margin-top: 20px; + + } + .mt22{ + margin-top: 22px; + } + .gouxuanimg{ + margin-right: 10px; + margin-bottom: 2px; + } + .textall{ + text-align: center; + font-size: 13px; + color: #4B4B4B; + } + .div1img{ + display: flex; + justify-content:center; + width: 42%; + margin-left: 30%; + + } +.yslgouxuanimg{ + width: 20%; + height: 20px; + margin-left: 86%; + float: right; +} +.yslgouxuanimg2{ + height: 20px; +} + +.yslbutondls{ + display: flex; + flex-direction:row; +} +。yslinpulsy input{ + +} +.loginInputzhuche{ + width: 100%; + background-color: #fff!important; + height: 45px !important; + padding: 5px; + +} +.loginInputzhucheyslass { + width: 100%; + background-color: #fff!important; + height: 45px !important; + padding: 5px; + +} +.loginInputzhucheyslass .ant-input{ + width: 100%; + background-color: #fff!important; + height: 45px !important; + padding: 5px; + position: relative; + right: 5px; + width: 103%; + border: 1px solid #FF0000!important; + border-radius: 4px; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; + border-bottom-left-radius: 4px; +} +.loginInputzhucheyslass .ant-input:hover{ + border: 1px solid #FF0000!important; + +} +.loginInputzhuche .ant-input{ + width: 100%; + background-color: #fff!important; + height: 45px !important; + padding: 5px; + position: relative; + right: 5px; + width: 103%; +} + +.loginInputzhucheysl{ + width: 100%; + background-color: #fff!important; + height: 45px !important; + padding: 5px; + border-radius: 4px; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; + border-bottom-left-radius: 4px; + +} +.loginInputzhucheysl .ant-input{ + width: 100%; + background-color: #fff!important; + height: 45px !important; + padding: 5px; + position: relative; + right: 5px; + width: 103%; + border: 1px solid #FF0000!important; + border-radius: 4px; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; + border-bottom-left-radius: 4px; +} +.loginInputzhucheysl .ant-input:hover{ + border: 1px solid #FF0000!important; +} + +.bth100{ + width: 100px; + margin: 0 auto; +} +.ant-input-affix-wrapper .ant-input-prefix, .ant-input-affix-wrapper .ant-input-suffix { + background: transparent !important; +} + +.startlogin{ + color:#888; +} +.weixinheight390{ + height: 390px; +} +#log_reg_content { + padding: 38px 30px 20px !important; +} \ No newline at end of file