diff --git a/package.json b/package.json index 05b98768..4fb71301 100644 --- a/package.json +++ b/package.json @@ -222,7 +222,7 @@ "webpack": "^4.42.1", "webpack-bundle-analyzer": "^3.7.0" }, - "volta":{ - "node":"8.12.0" + "volta": { + "node": "8.12.0" } } diff --git a/src/forge/Head/Header.js b/src/forge/Head/Header.js index a7f8219d..5b41c33c 100644 --- a/src/forge/Head/Header.js +++ b/src/forge/Head/Header.js @@ -199,7 +199,8 @@ class NewHeader extends Component { const hostname = window.location.hostname; const port = window.location.port; const isDev = window.location.port == 3007; - let isdev2= isDev ?'http://192.168.1.40:3000':`http://${hostname}`; + let isdev2= isDev ?'http://117.50.100.12:49999':`http://${hostname}`; + console.log(url,isdev2,isDev); let str = ""; if(url.indexOf("http")>-1){ if(url.indexOf("https")>-1){ @@ -326,22 +327,7 @@ class NewHeader extends Component { { settings.navbar && settings.navbar.map((item, key) => { var new_link = item.link; - // var user_login = current_user && current_user.login; var is_hidden = item.hidden; - // if (new_link && (new_link.indexOf("courses") > -1 || new_link.indexOf("contests") > -1)) { - // if (user_login) { - // if (new_link.indexOf("courses") > -1) { - // new_link = new_link.replace(/courses/g, user_login + "/courses") - // } else if (new_link.indexOf("contests") > -1) { - // new_link = new_link.replace(/contests/g, user_login + "/contests") - // } - // } else { - // is_hidden = true - // } - // } - // if (user_login && (new_link && new_link.indexOf("homes") > -1)) { - // new_link = new_link.replace(/homes/g, user_login + "/user_activities") - // } var waiLian = (new_link && str.filter(item=>new_link.indexOf(item)>-1) ); var wl = waiLian && waiLian.length>0; return ( diff --git a/src/forge/Order/order_form.js b/src/forge/Order/order_form.js index 205f476f..f4929f9c 100644 --- a/src/forge/Order/order_form.js +++ b/src/forge/Order/order_form.js @@ -36,7 +36,8 @@ class order_form extends Component { show_token: false, cannot_edit: false, issue_current_user: true, - atWhoLoginList:undefined + atWhoLoginList:undefined, + endDisableData:undefined }; } componentDidUpdate=(prevPros)=>{ @@ -276,7 +277,11 @@ class order_form extends Component { changeBeginTime = (start_date, value) => { this.setState({ start_date: value, + endDisableData:c=>c { this.setState({ @@ -347,13 +352,12 @@ class order_form extends Component { }); } }; - render() { const { getFieldDecorator } = this.props.form; const { projectsId , owner } = this.props.match.params; const { orderId } = this.props.match.params; const { form_type } = this.props; - const {issue_chosen,branches,description,get_attachments,isSpin,start_date,due_date} = this.state; + const {issue_chosen,branches,description,get_attachments,isSpin,start_date,due_date,endDisableData} = this.state; return (
@@ -523,6 +527,7 @@ class order_form extends Component { style={{ width: "100%" }} placeholder="请选择结束日期" onChange={this.changeEndTime} + disabledDate={endDisableData} /> diff --git a/src/modules/tpm/NewHeader.js b/src/modules/tpm/NewHeader.js index 8ed2dbfa..e1220ce4 100644 --- a/src/modules/tpm/NewHeader.js +++ b/src/modules/tpm/NewHeader.js @@ -577,34 +577,60 @@ class NewHeader extends Component { matchpaths = (url) => { const { match } = this.props; - let pathname=sessionStorage.pathname; - if(url){ - if (url.indexOf('forums') > -1 && match.path.indexOf('forums') > -1) { - return true - // 开源项目,路由改版后,比较麻烦,因此使用多个进行判断 - } else if (url.indexOf('explore') > -1 && match.path.indexOf('explore') > -1) { - return true - // 开源项目,路由改版后,比较麻烦,因此使用多个进行判断 - } else if (url.indexOf('explore') > -1 && match.url.indexOf(pathname) > -1 && match.url.indexOf('/administration') === -1 && match.url.indexOf('/admin') === -1) { - return true - // 公告 - } else if (url.indexOf('/notice') > -1 && match.path.indexOf('/notice') > -1) { - return true - // 创客 - } else if (url.indexOf('/task') > -1 && match.path.indexOf('/task') > -1) { - return true - // 成果库 - } else if (url.indexOf('/achievement') > -1 && match.path.indexOf('/achievement') > -1) { - return true - // 管理 - } else if ((url.indexOf('/managements') > -1 && (match.path.indexOf('/managements') > -1 || match.path.indexOf('/administration') > -1 || match.path.indexOf('/admin') > -1))) { - return true - } else if (['http://117.50.100.12:8080','https://osredm.com','http://111.8.36.180:8000','http://localhost:3007'].includes(url) && match.path === '/') { - return true - } else { - return false + const hostname = window.location.hostname; + const port = window.location.port; + const isDev = hostname == "localhost"; + let isdev2= isDev ?'http://117.50.100.12:49999':`http://${hostname}`; + let str = ""; + if(url.indexOf("http")>-1){ + if(url.indexOf("https")>-1){ + isdev2 = `https://${hostname}`; } + if(!isDev && port){ + isdev2+=`:${port}`; + } + str = isdev2+match.path; + }else{ + str = match.path; } + + console.log(str,(url+"/"),url && str === url); + if (url && (str === url || str===(url+"/"))) { + return true + }else { + return false + } + + // const { match } = this.props; + // let pathname=sessionStorage.pathname; + // console.log(url); + // if(url){ + // if (url.indexOf('forums') > -1 && match.path.indexOf('forums') > -1) { + // return true + // // 开源项目,路由改版后,比较麻烦,因此使用多个进行判断 + // } else if (url.indexOf('explore') > -1 && match.path.indexOf('explore') > -1) { + // return true + // // 开源项目,路由改版后,比较麻烦,因此使用多个进行判断 + // } else if (url.indexOf('explore') > -1 && match.url.indexOf(pathname) > -1 && match.url.indexOf('/administration') === -1 && match.url.indexOf('/admin') === -1) { + // return true + // // 公告 + // } else if (url.indexOf('/notice') > -1 && match.path.indexOf('/notice') > -1) { + // return true + // // 创客 + // } else if (url.indexOf('/task') > -1 && match.path.indexOf('/task') > -1) { + // return true + // // 成果库 + // } else if (url.indexOf('/achievement') > -1 && match.path.indexOf('/achievement') > -1) { + // return true + // // 管理 + // } else if ((url.indexOf('/managements') > -1 && (match.path.indexOf('/managements') > -1 || match.path.indexOf('/administration') > -1 || match.path.indexOf('/admin') > -1))) { + // return true + // } else if (['http://117.50.100.12:8080','https://osredm.com','http://111.8.36.180:8000','http://localhost:3007'].includes(url) && match.path === '/') { + // return true + // } else { + // return false + // } + // } } handleVisibleChange = visible => {