修改volta设置的node版本

This commit is contained in:
何童崇 2022-12-13 14:26:08 +08:00
commit a74fc72021
25 changed files with 155 additions and 102 deletions

View File

@ -222,7 +222,7 @@
"webpack": "^4.42.1",
"webpack-bundle-analyzer": "^3.7.0"
},
"volta": {
"node": "14.17.3"
"volta":{
"node":"8.12.0"
}
}

View File

@ -1,7 +1,7 @@
import React, { useState , forwardRef, useEffect } from 'react';
import { Form , Modal , Input , Radio } from 'antd';
import { Form , Modal , Input , Radio ,Button} from 'antd';
import Axios from 'axios';
import CheckProfile from '../Component/ProfileModal/Profile';
// import CheckProfile from '../Component/ProfileModal/Profile';
function AddProjectModal(props){
const { getFieldDecorator, validateFields , setFieldsValue } = props && props.form;
const [ visible , setVisible ] = useState(false);
@ -78,7 +78,9 @@ function AddProjectModal(props){
</Form.Item>
</Form>
</Modal>
<CheckProfile {...props} sureFunc={()=>setVisible(true)}>加入项目</CheckProfile>
{/* 红山无资料要求限制,暂时注释 */}
{/* <CheckProfile {...props} sureFunc={()=>setVisible(true)}>加入项目</CheckProfile> */}
<Button type="primary" onClick={()=>setVisible(true)}>加入项目</Button>
</React.Fragment>
)
}

View File

@ -233,11 +233,12 @@ function CoderDepot(props){
let checkvalue = turnbar(b);
return (
<Menu className="fileMenu">
<Menu.Item>
<CheckProfile {...props} sureFunc={()=>urlLink(`/${owner}/${projectsId}/${checkvalue}/uploadfile${treeValue === undefined ? "" : `/${treeValue}`}`)}>上传文件</CheckProfile>
<Menu.Item onClick={()=>urlLink(`/${owner}/${projectsId}/${checkvalue}/uploadfile${treeValue === undefined ? "" : `/${treeValue}`}`)}>
上传文件
{/* <CheckProfile {...props} sureFunc={()=>urlLink(`/${owner}/${projectsId}/${checkvalue}/uploadfile${treeValue === undefined ? "" : `/${treeValue}`}`)}>上传文件</CheckProfile> */}
</Menu.Item>
<Menu.Item>
<CheckProfile {...props} sureFunc={()=>urlLink(`/${owner}/${projectsId}/${checkvalue}/newfile${treeValue === undefined ? "" : `/${treeValue}`}`)}>新建文件</CheckProfile>
<Menu.Item onClick={()=>urlLink(`/${owner}/${projectsId}/${checkvalue}/newfile${treeValue === undefined ? "" : `/${treeValue}`}`)}>新建文件
{/* <CheckProfile {...props} sureFunc={()=>urlLink(`/${owner}/${projectsId}/${checkvalue}/newfile${treeValue === undefined ? "" : `/${treeValue}`}`)}>新建文件</CheckProfile> */}
</Menu.Item>
</Menu>
)
@ -434,8 +435,8 @@ function CoderDepot(props){
{
<div className="addOptionBtn">
{
baseOperate &&
<CheckProfile {...props} sureFunc={()=>urlLink(`/${owner}/${projectsId}/compare/master...${turnbar(branchName || defaultBranch)}`)} >+ 合并请求</CheckProfile>
baseOperate &&<a onClick={()=>urlLink(`/${owner}/${projectsId}/compare/master...${turnbar(branchName || defaultBranch)}`)}>+ 合并请求</a>
// <CheckProfile {...props} sureFunc={()=>urlLink(`/${owner}/${projectsId}/compare/master...${turnbar(branchName || defaultBranch)}`)} >+ </CheckProfile>
}
<a onClick={createIssue}>+ 疑修</a>
{/* {

View File

@ -11,7 +11,7 @@ import axios from 'axios';
import img_new from '../Images/new.png';
import img_array from '../Images/array.png';
import banner from '../Images/banner_list.png';
import CheckProfile from '../Component/ProfileModal/Profile';
// import CheckProfile from '../Component/ProfileModal/Profile';
import Slider from 'react-slick';
import left from './img/left.png';
import right from './img/right.png';

View File

@ -1,5 +1,5 @@
import React, { Component } from "react";
import { Input, Dropdown, Menu, Icon, Pagination, Spin } from "antd";
import { Input, Dropdown, Menu, Icon, Pagination, Spin, Button } from "antd";
import "./merge.css";
import "../Order/order.css";
import "../Order/index.scss";
@ -257,9 +257,10 @@ class merge extends Component {
</div>
{
data && data.user_admin_or_developer &&
<CheckProfile {...this.props} className="topWrapper_btn ml10" sureFunc={() => this.checkOperation()}>
+&nbsp;新建合并请求
</CheckProfile>
<Button className="topWrapper_btn ml10" onClick={() => this.checkOperation()}>+&nbsp;新建合并请求</Button>
// <CheckProfile {...this.props} className="topWrapper_btn ml10" sureFunc={() => this.checkOperation()}>
// +&nbsp;新建合并请求
// </CheckProfile>
}
</div>
<div className="f-wrap-between screenWrap">

View File

@ -6,6 +6,7 @@ import "./index.css";
import { turnbar , returnbar } from 'educoder';
import axios from "axios";
import { Base64 } from "js-base64";
const TextArea = Input.TextArea;
class UserSubmitComponent extends Component {
@ -63,7 +64,7 @@ class UserSubmitComponent extends Component {
filepath: filename ? filename : path,
branch: returnbar(branch),
new_branch: submitType === "1" ? values.branchname : undefined,
content,
content:editor_type === "upload" ? content : Base64.encode(content),
message: values.desc,
})
.then((result) => {

View File

@ -4,7 +4,7 @@ import { Dropdown, Icon, Menu, Pagination, Typography, Popconfirm, Spin } from '
import NoneData from '../Nodata';
import axios from 'axios';
import './order.css';
import CheckProfile from '../Component/ProfileModal/Profile';
// import CheckProfile from '../Component/ProfileModal/Profile';
const { Text } = Typography;
@ -189,7 +189,8 @@ class Milepost extends Component {
</ul>
{
data && data.user_admin_or_member ?
<CheckProfile {...this.props} className="topWrapper_btn" sureFunc={() => {this.props.history.push(`/${owner}/${projectsId}/milestones/new`)}}>新的里程碑</CheckProfile>
// <CheckProfile {...this.props} className="topWrapper_btn" sureFunc={() => {this.props.history.push(`/${owner}/${projectsId}/milestones/new`)}}>新的里程碑</CheckProfile>
<Link className="topWrapper_btn" to={`/${owner}/${projectsId}/milestones/new`}>新的里程碑</Link>
: ''
}
</div>

View File

@ -3,7 +3,7 @@ import { Link } from 'react-router-dom';
import { Dropdown, Menu, Icon, Pagination, Spin } from 'antd';
import './order.css';
import { FlexAJ } from '../Component/layout';
import CheckProfile from '../Component/ProfileModal/Profile';
// import CheckProfile from '../Component/ProfileModal/Profile';
import NoneData from '../Nodata';
import OrderItem from './OrderItem';
@ -246,7 +246,8 @@ class MilepostDetail extends Component {
}
{
current_user && current_user.login ?
<CheckProfile {...this.props} sureFunc={()=>{this.props.history.push(`/${owner}/${projectsId}/issues/${meilid}/new`)}} className="topWrapper_btn">创建疑修</CheckProfile>
// <CheckProfile {...this.props} sureFunc={()=>{this.props.history.push(`/${owner}/${projectsId}/issues/${meilid}/new`)}} className="topWrapper_btn">创建疑修</CheckProfile>
<Link className="topWrapper_btn" to={`/${owner}/${projectsId}/issues/${meilid}/new`}>创建疑修</Link>
:
<a className="topWrapper_btn" onClick={showLoginDialog}>创建疑修</a>
}

View File

@ -6,7 +6,7 @@ import './Index.scss';
import Item from './ListItem';
import Right from './RightBox';
import NoData from '../Nodata';
import CheckProfile from '../Component/ProfileModal/Profile';
// import CheckProfile from '../Component/ProfileModal/Profile';
import RenderHtml from 'src/components/render-html';
import img from '../Images/organizationImg.png';
import Box from '../users/GeneralView/ConcentrateBox';

View File

@ -6,7 +6,7 @@ import { getImageUrl } from 'educoder';
import { Link } from 'react-router-dom';
import Nodata from '../Nodata';
import CheckProfile from '../Component/ProfileModal/Profile';
// import CheckProfile from '../Component/ProfileModal/Profile';
import { Progress } from 'antd';
const Span = styled.span`{
@ -124,13 +124,13 @@ function RightBox({ OIdentifier , history , admin , showCompeleteDialog ,complet
name="组织团队"
count={groupData && groupData.total_count}
bottom={
admin &&
<CheckProfile
showCompeleteDialog={showCompeleteDialog}
completeProfile={completeProfile}
sureFunc={()=>history.push(`/${OIdentifier}/teams/new`)}
className={"ant-btn ant-btn-primary"}
>新建团队</CheckProfile>
admin && <Link className="ant-btn ant-btn-primary" to={`/${OIdentifier}/teams/new`}>新建团队</Link>
// <CheckProfile
// showCompeleteDialog={showCompeleteDialog}
// completeProfile={completeProfile}
// sureFunc={()=>history.push(`/${OIdentifier}/teams/new`)}
// className={"ant-btn ant-btn-primary"}
// ></CheckProfile>
}
url={`/${OIdentifier}/teams`}
>

View File

@ -1,8 +1,5 @@
import React, { Component } from "react";
import { Upload, Icon } from "antd";
import { getUploadActionUrl, appendFileSizeToUploadFileAll } from "educoder";
import axios from "axios";
const { Dragger } = Upload;
class Read extends Component {
constructor(props) {
@ -22,53 +19,43 @@ class Read extends Component {
});
};
handleChange = (info) => {
let reader = new FileReader();
reader.readAsText(info.fileList[0].originFileObj, "UTF-8");
reader.onload = (e) => {
this.state.fileContent = e.target.result;
this.props.load && this.props.load(this.state);
};
};
beforeUpload = (file) => {
const forbidden_type = [
"jpg",
"jpeg",
"png",
"ico",
"bmp",
"gif",
"pdf",
"csv",
"xlsx",
"xls",
"tif",
"svg",
"psd",
"cdr",
"webp",
];
const { fileList } = this.state;
const { size } = this.props;
const isLt100M = file.size / 1024 / 1024 < size;
const file_type = file.type.split("/").slice(-1)[0];
if (fileList && fileList.length > 0) {
this.props.showNotification("文件已存在, 请删除后再上传");
return false;
} else if (!isLt100M) {
this.props.showNotification(`文件大小必须小于${size}MB!`);
} else if (file_type && forbidden_type.indexOf(file_type) !== -1) {
this.props.showNotification(`不支持${file_type}类型`);
return false;
} else {
this.setState({
fileList: [file],
fileName: file.name,
})
}
return false;
};
// 上传 文件转base64
customRequest = (option) =>{
const formData = new FormData();
formData.append('files[]', option.file);
const reader = new FileReader();
reader.readAsDataURL(option.file);
const {load} = this.props;
reader.onloadend = function(e){
if(e.target.result){
option.onSuccess();
const base64 = e.target.result.substring(e.target.result.indexOf('base64')+7, e.target.result.length);
load({
fileName: option.file.name,
fileContent: base64
});
}
}
}
render() {
//判断是否已经提交,如已提交评论则上一条评论数据清除
const { icon, size } = this.props;
@ -76,10 +63,10 @@ class Read extends Component {
const upload = {
name: "file",
fileList: fileList,
onChange: this.handleChange,
customRequest: this.customRequest,
onRemove: this.onAttachmentRemove,
beforeUpload: this.beforeUpload
};
beforeUpload: this.beforeUpload,
};
return (
<Dragger {...upload} className={this.props.className}>
@ -92,7 +79,7 @@ class Read extends Component {
拖动文件或<span className="color-blue">点击此处上传</span>
</p>
{/* <p className="mt10">
暂仅支持文格式不支持图片,excel等不可以txt读取的文件
暂仅支持文格式不支持图片,excel等不可以txt读取的文件
</p> */}
<p className="mt10">
文件名请使用英文且不得超过{size}MB

View File

@ -1,7 +1,7 @@
import React, { useEffect, useState } from 'react';
import { Modal , Checkbox , Spin , Input } from 'antd';
import Axios from 'axios';
import CheckProfile from '../../Component/ProfileModal/Profile';
// import CheckProfile from '../../Component/ProfileModal/Profile';
import './Index.scss';
const { Search } = Input;

View File

@ -1,6 +1,6 @@
import React, { Component } from "react";
import { Menu, Input, Spin, Pagination, Popover, Button, Divider } from "antd";
import CheckProfile from '../Component/ProfileModal/Profile';
// import CheckProfile from '../Component/ProfileModal/Profile';
import axios from "axios";
import ListItem from "../Main/IndexItem";

View File

@ -1,11 +1,12 @@
import React , { useEffect , useState } from 'react';
import { Dropdown, Menu , Pagination } from 'antd';
import { Link } from 'react-router-dom';
import Search from '../Component/Search';
import Item from './Team-item';
import Nodata from '../Nodata';
import axios from 'axios';
import CheckProfile from '../Component/ProfileModal/Profile';
// import CheckProfile from '../Component/ProfileModal/Profile';
const limit = 15;
function Team(props){
@ -57,7 +58,8 @@ function Team(props){
<p>
{
current_user && current_user.login === username &&
<CheckProfile {...props} sureFunc={()=>{props.history.push('/organize/new')}}><i className="iconfont icon-xinjian1 mr3 font-14"></i>新建组织</CheckProfile>
// <CheckProfile {...props} sureFunc={()=>{props.history.push('/organize/new')}}><i className="iconfont icon-xinjian1 mr3 font-14"></i></CheckProfile>
<Link className="ant-btn ant-btn-primary" to={`/organize/new`}><i className="iconfont icon-xinjian1 mr3 font-14"></i>新建组织</Link>
}
<Dropdown overlay={menu}>
<a>排序<i className="iconfont icon-sanjiaoxing-down ml3 font-14"></i></a>

View File

@ -331,7 +331,7 @@ const Competition = (props) => {
{/* 交流互动 */}
<Route path="/competition/:competitionId/chat"
render={
() => (<Chat {...props} isLoacl={qzDetail && qzDetail.is_local} />)
() => (<Chat {...props} isLocal={qzDetail && qzDetail.is_local}/>)
}
></Route>
{/* 联系我们 */}

View File

@ -402,6 +402,13 @@ export function checkPaper(data) {
});
}
export function agreeNoPassAPI(paperId){
return fetch({
url: `/api/paper/updatePaperCheckStatus/${paperId}`,
method: 'put',
});
}
// 成果申诉
export function complainPaper(data) {
return fetch({

View File

@ -76,7 +76,7 @@ export default Form.create()(props => {
onCancel={() => { setVisible(false) }}
className="form-edit-modal"
>
{checkedItem.checkStatus == 2 && detailStatus === 3 && <p className=" mb10 color-orange task_tip">审核意见{checkedItem.auditing.message}</p>}
{checkedItem.checkStatus == 0 && detailStatus === 3 && <p className=" mb10 color-orange task_tip">审核意见{checkedItem.auditing.message}</p>}
<p className="edu-txt-center lineh-20 mb10">你的申诉信息将发送给平台管理员</p>
<p className="edu-txt-center lineh-20">请如实填写有效的申诉原由我们将尽快完成审核</p>
{

View File

@ -3,7 +3,7 @@ import { Input, Radio, Select, Button, Form, DatePicker, Table, Pagination, Moda
import { Link } from "react-router-dom";
import { Confirm } from '../../components/ModalFun';
import { paperCheckStatusArr,taskStatusAllArr } from '../static';
import { readyCheckPapers, checkPaper,deletePaper } from '../api';
import { readyCheckPapers, checkPaper,deletePaper,agreeNoPassAPI } from '../api';
import '../index.scss';
import './index.scss';
const format = "YYYY-MM-DD HH:mm:ss";
@ -180,10 +180,12 @@ export default Form.create()(({ current_user, form, showNotification, match, his
title: '审核状态',
dataIndex: 'checkStatus',
render: (text, record) => {
return text === 2 ? <React.Fragment>
<Button className="mr5 font-12" type="primary" size="small" onClick={() => { checkPaperItem(record.id, true) }}>通过</Button>
<Button className="mr5 font-12" type="info" size="small" onClick={() => { disagree(record) }}>不通过</Button>
</React.Fragment> : checkStatusArr[text]
return checkStatusArr[text]
// text === 2 ? <React.Fragment>
// <Button className="mr5 font-12" type="primary" size="small" onClick={() => { checkPaperItem(record.id, true) }}></Button>
// <Button className="mr5 font-12" type="info" size="small" onClick={() => { disagree(record) }}></Button>
// </React.Fragment> :
}
},
{
@ -191,16 +193,28 @@ export default Form.create()(({ current_user, form, showNotification, match, his
key: 'action',
render: (text, record) => (
<React.Fragment>
<Link className="mr5 line_1 color-grey3" to={`/task/taskDetail/${record.taskId}`}>查看</Link>
{record.task&&record.task.status==3&&<a className="mr5 line_1 color-grey3" onClick={() => { deleteItem(record.id) }}>删除</a>}
{record.checkStatus ===2&&<Button className="mr5 font-12" type="primary" size="small" onClick={() => { checkPaperItem(record.id, true) }}>通过</Button>}
{record.checkStatus ===0&&<Button className="mr5 font-12" type="primary" size="small" onClick={() => { agreeNoPass(record.id) }}>通过</Button>}
{record.checkStatus !==0&&<Button className="mr5 font-12" type="info" size="small" onClick={() => { disagree(record) }}>不通过</Button>}
{record.task&&record.task.status==3&&<Button type="danger" size="small" className="mr5 font-12" onClick={() => { deleteItem(record.id) }}>删除</Button>}
{/* {record.task&&record.task.status==3&&<Button className=" font-12" type="danger" size="small" onClick={() => { deleteItem(record.id) }}>删除</Button>} */}
</React.Fragment>
),
},
]
}, []);
function agreeNoPass(paperId){
setLoading(true);
agreeNoPassAPI(paperId).then(res => {
setLoading(false);
if (res && res.message === 'success') {
setReload(Math.random());
}
});
}
//
function disagree(item) {
if (!item.parentId) {

View File

@ -110,20 +110,23 @@ export const sortArr = [
},
];
// 任务成果状态
export const applyStatusArr = [
{ dicItemCode: "0,3,4", name: "待确认", dicItemName: "待确认" },
// { dicItemCode: "0,3,4", name: "待确认", dicItemName: "待确认" },
// { dicItemCode: "0", name: "待评选", dicItemName: "待评选" },
{ dicItemCode: "1", name: "未采纳", dicItemName: "未采纳" },
{ dicItemCode: "2", name: "评选胜出", dicItemName: "评选胜出" },
];
// 任务成果状态
export const applyStatusAllArr = [
{ dicItemCode: "0", name: "待确认", dicItemName: "待确认" },
{ dicItemCode: "0", name: "待评选", dicItemName: "待评选" },
{ dicItemCode: "1", name: "未采纳", dicItemName: "未采纳" },
{ dicItemCode: "2", name: "评选胜出", dicItemName: "评选胜出" },
{ dicItemCode: "3", name: "待确认", dicItemName: "待确认" },
{ dicItemCode: "4", name: "待确认", dicItemName: "待确认" },
// { dicItemCode: "3", name: "待确认", dicItemName: "待确认" },
// { dicItemCode: "4", name: "待确认", dicItemName: "待确认" },
];
// 任务成果审核状态
@ -133,6 +136,12 @@ export const paperCheckStatusArr = [
{ dicItemCode: "0", name: "未通过", dicItemName: "未通过" },
];
// 任务成果状态
export const paperCheckSearchArr = [
{ dicItemCode: "2", name: "待审核", dicItemName: "待审核" },
{ dicItemCode: "1", name: "待评选", dicItemName: "待评选" },
];
// 提示语数组
export const paperCheckTextArr = [
"您的成果审核未通过",

View File

@ -208,7 +208,8 @@ export default Form.create()(({ form, showNotification, match, history, state })
>
{
showUserModeArr.map(item => {
return <Option key={item.dicItemCode} value={item.dicItemCode}>{item.dicItemName}</Option>
//
return <Option key={item.dicItemCode} value={item.dicItemCode} disabled={item.dicItemCode===1 && [5,6,7,8].includes(record.status)}>{item.dicItemName}</Option>
})
}
</Select>

View File

@ -9,7 +9,7 @@ import StatusNav from '../../components/statusNav';
import ItemListPaper from '../components/itemListPaper';
import ProofModal from '../components/proofModal';
import { getTaskDetail, getTaskCategory, getTaskPaper, makePublic, addPaper, getAgreement, agreement, checkAgreement, checkHavePaper, addExpertReview, followTask, unfollowTask } from '../api';
import { taskModeIdArr, applyStatusArr, applyStatusAllArr, agreementContent, paperCheckTextArr, surplusTime } from '../static';
import { taskModeIdArr, applyStatusArr, applyStatusAllArr,paperCheckSearchArr, agreementContent, paperCheckTextArr, surplusTime } from '../static';
import { httpUrl } from '../fetch';
import './index.scss';
import { getRules } from 'src/military/expert/api';
@ -45,6 +45,7 @@ export default Form.create()(
const [paperUploadLoading, setPaperUploadLoading] = useState(false);
const [status, setStatus] = useState('');
const [checkStatus, setCheckStatus] = useState('');
const [curPage, setCurPage] = useState(1);
const [total, setTotal] = useState(0);
const [dataList, setDataList] = useState([]);
@ -140,6 +141,7 @@ export default Form.create()(
pageSize: 10,
curPage,
status,
checkStatus
}
getTaskPaper(params).then(data => {
if (data && Array.isArray(data.rows)) {
@ -155,7 +157,7 @@ export default Form.create()(
setTotal(data.total);
});
}
}, [id, status, curPage, reload, relaodChildList, detailData, current_user.login]);
}, [id, status, checkStatus, curPage, reload, relaodChildList, detailData, current_user.login]);
//
@ -234,10 +236,19 @@ export default Form.create()(
})
}
function changeOptionId(option) {
// function changeOptionId(option) {
// setStatus(option.dicItemCode.toString() || '');
// setCurPage(1);
// }
//
const changeOptionId = useCallback((option, type) => {
if (type === 'applyStatus') {
setStatus(option.dicItemCode.toString() || '');
setCurPage(1);
}
} else if (type === 'checkStatus') {
setCheckStatus(option.dicItemCode);
}
setCurPage(1);
}, []);
//
function agreementSign() {
@ -542,16 +553,25 @@ export default Form.create()(
{detailData.status === 4 && dataList.length && (!detailData.isProofBoolean) && (!detailData.expertReview) && detailData.user && (current_user.admin || current_user.login === detailData.user.login) ?
<a className="line_1 color-blue fr ml20" onClick={() => { setVisibleProofs(true) }}>上传佐证材料</a> : ''}
{dataList.length > 0 && taskLimit && <a className="line_1 color-blue fr ml20" onClick={() => { window.open(`${httpUrl}/api/paper/papers/download/${id}`) }}>一键导出成果物 &gt;&gt;</a>}
{(!detailData.showUserStatus) && !detailData.expertReview && taskLimit && <a className="fr color-orange ml20" onClick={showUser}>应征者名单公示 &gt;&gt;</a>}
{/* 若后台为“手动公示”,则显示按钮,是否公示由雇主与管理员是否点击“应征者名单公示”按钮决定,同时必须有成果,非关闭状态 */}
{!detailData.showUserStatus && !detailData.expertReview && taskLimit && detailData.showUserMode===2 && <a className="fr color-orange ml20" onClick={showUser}>应征者名单公示 &gt;&gt;</a>}
{/* [添加专家评审流程]按钮入口,仅管理员可见 */}
{taskLimit && !detailData.expertReview && detailData.status < 4 && <a className="fr color-orange ml20" onClick={addExpertReviewModal}>添加专家评审流程</a>}
</div>
<StatusNav
{[5,6,7,8].includes(detailData.status)&&<StatusNav
key={'applyStatus'}
type={'applyStatus'}
options={applyStatusArr}
changeOptionId={changeOptionId}
/>
/>}
{[3,4].includes(detailData.status)&& <StatusNav
key={'checkStatus'}
type={'checkStatus'}
options={paperCheckSearchArr}
changeOptionId={changeOptionId}
/> }
<ItemListPaper
current_user={current_user}

View File

@ -60,6 +60,9 @@ export default Form.create()(forwardRef(({ current_user, form, showNotification,
setPublished(true);
setStatus(data.status);
setPublishedAt(data.publishedAt || data.createdAt)
}else{
//
CompanyInfo();
}
let formValue = {
name: data.name,
@ -118,10 +121,11 @@ export default Form.create()(forwardRef(({ current_user, form, showNotification,
};
setFieldsValue(formValue);
setCategoryId('7');
CompanyInfo();
}
}, [id]);
useEffect(() => {
function CompanyInfo(){
getCompanyInfo().then(res => {
if (res && res.message === 'success') {
setEnterpriseName(res.data.enterpriseName);
@ -133,7 +137,7 @@ export default Form.create()(forwardRef(({ current_user, form, showNotification,
showNotification(res.message);
}
});
}, []);
}
useEffect(() => {
getTaskCategory().then(data => {

View File

@ -463,6 +463,7 @@ class LoginDialog extends Component {
render() {
let { login, isGoing, isGoingValue, disabled, Phonenumberisnotco, dialogBox, isRender, weixinlogin, settings } = this.state;
if (isRender === undefined) {
isRender = false
}
@ -575,7 +576,7 @@ class LoginDialog extends Component {
</span>
</p>
{
settings && settings.third_party_test && settings.third_party_test.length > 0 ?
settings && !settings.is_local && settings.third_party_test && settings.third_party_test.length > 0 ?
<p className="clearfix mt20">
<span className={"startlogin"}> 快速登录 </span>
<div className="thirdBox">

View File

@ -10,6 +10,9 @@ import { getImageUrl } from 'educoder';
import './LoginRegisterPage.scss';
function Login(props) {
const settings=localStorage.getItem('chromesetting')?JSON.parse(localStorage.getItem('chromesetting')):{};
let is_local=settings.is_local;
const [message, setMessage] = useState();
const [setting, setSetting] = useState(undefined);
const { form, location } = props;
@ -65,8 +68,6 @@ function Login(props) {
}
}
const settings = JSON.parse(localStorage.getItem('chromesetting'));
return (
<div>
<div className="right_cont login_content">
@ -116,7 +117,7 @@ function Login(props) {
</Form>
{
settings && settings.third_party_test && settings.third_party_test.length > 0 ?
settings && !is_local && settings.third_party_test && settings.third_party_test.length > 0 ?
<p className="clearfix mt20">
<span className={"startlogin"}> 快速登录 </span>
<div className="thirdBox">

View File

@ -786,7 +786,7 @@ class NewHeader extends Component {
settings && settings.add && settings.add.map((item,key)=>{
return(
<li key={key}>
{ item.name!=="需求申请"?<a href={item.url}>{item.name}</a>:<a onClick={()=>{this.needAdd(item.url)}}>{item.name}</a>}
{ item.url.indexOf('needs/new')<0?<a href={item.url}>{item.name}</a>:<a onClick={()=>{this.needAdd(item.url)}}>{item.name}</a>}
</li>
)
})