forked from Gitlink/forgeplus-react
更新luoji
This commit is contained in:
parent
f10b8158cb
commit
e69130f25c
|
|
@ -3,8 +3,10 @@
|
|||
<component name="ChangeListManager">
|
||||
<list default="true" id="9830c5da-176a-4c72-a301-9f6ce98c82fe" name="Default Changelist" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/App.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/App.js" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/military/achievement.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/military/achievement.js" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/AppConfig.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/AppConfig.js" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/military/notice/api.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/military/notice/api.js" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/military/notice/noticeDetail/index.jsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/military/notice/noticeDetail/index.jsx" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/military/notice/noticeList/index.jsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/military/notice/noticeList/index.jsx" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
|
@ -168,16 +170,16 @@
|
|||
<option name="hideEmptyMiddlePackages" value="true" />
|
||||
<option name="showLibraryContents" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent"><![CDATA[{
|
||||
"keyToString": {
|
||||
"WebServerToolWindowFactoryState": "false",
|
||||
"last_opened_file_path": "E:/forgeplus-react/src/military/achievement/overview",
|
||||
"node.js.detected.package.eslint": "true",
|
||||
"node.js.selected.package.eslint": "(autodetect)",
|
||||
"nodejs_package_manager_path": "npm",
|
||||
"vue.rearranger.settings.migration": "true"
|
||||
<component name="PropertiesComponent">{
|
||||
"keyToString": {
|
||||
"WebServerToolWindowFactoryState": "false",
|
||||
"last_opened_file_path": "E:/forgeplus-react/src/military/achievement/overview",
|
||||
"node.js.detected.package.eslint": "true",
|
||||
"node.js.selected.package.eslint": "(autodetect)",
|
||||
"nodejs_package_manager_path": "npm",
|
||||
"vue.rearranger.settings.migration": "true"
|
||||
}
|
||||
}]]></component>
|
||||
}</component>
|
||||
<component name="RecentsManager">
|
||||
<key name="CopyFile.RECENT_KEYS">
|
||||
<recent name="E:\forgeplus-react\src\military\achievement\overview" />
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ if (isDev) {
|
|||
}
|
||||
debugType = window.location.search.indexOf('debug=t') !== -1 ? 'teacher' :
|
||||
window.location.search.indexOf('debug=s') !== -1 ? 'student' :
|
||||
window.location.search.indexOf('debug=a') !== -1 ? 'a' : parsed.debug || 'admin'
|
||||
window.location.search.indexOf('debug=a') !== -1 ? 'a' : parsed.debug
|
||||
}
|
||||
window._debugType = debugType;
|
||||
export function initAxiosInterceptors(props) {
|
||||
|
|
|
|||
|
|
@ -27,14 +27,20 @@ export async function getNoticeDetail(id) {
|
|||
method: 'get',
|
||||
params:{flag:1}
|
||||
});
|
||||
if (res.data) {
|
||||
return res.data;
|
||||
} else {
|
||||
notification.open({
|
||||
message: "提示",
|
||||
description: res.message || '请求错误',
|
||||
});
|
||||
// 2023/11/24 因为根据登录状态来控制是否可以显示details页面 所以在这里加了个一个判断
|
||||
if (res.message === '403'){
|
||||
return '403'
|
||||
}else {
|
||||
if (res.data) {
|
||||
return res.data;
|
||||
} else {
|
||||
notification.open({
|
||||
message: "提示",
|
||||
description: res.message || '请求错误',
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//新增加密公告申请人
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ for (const item of noticeType) {
|
|||
noticeTypeArr[item.code] = item.name;
|
||||
}
|
||||
|
||||
export default Form.create()(({ match, history, showNotification, form }) => {
|
||||
export default Form.create()(({ match, history, showNotification, form,current_user,showLoginDialog}) => {
|
||||
const { getFieldDecorator, validateFields, setFieldsValue } = form;
|
||||
|
||||
const [reload, setReload] = useState(0);
|
||||
|
|
@ -21,13 +21,21 @@ export default Form.create()(({ match, history, showNotification, form }) => {
|
|||
|
||||
const id = match.params.noticeId;
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
id && getNoticeDetail(id).then(data => {
|
||||
if (data) {
|
||||
|
||||
if (data === '403'){
|
||||
showLoginDialog()
|
||||
}else if (data){
|
||||
data.publishDate = data.publishDate.split(' ')[0];
|
||||
data.createdAt = data.createdAt.split(' ')[0];
|
||||
data.closingDate = data.closingDate.split(' ')[0];
|
||||
}
|
||||
|
||||
setNoticeData(data || {});
|
||||
})
|
||||
}, [id, reload]);
|
||||
|
|
@ -49,10 +57,12 @@ export default Form.create()(({ match, history, showNotification, form }) => {
|
|||
...values,
|
||||
annId: noticeData.id,
|
||||
}).then(res => {
|
||||
|
||||
if (res.message === "success") {
|
||||
setVisible(false);
|
||||
setReload(Math.random());
|
||||
} else {
|
||||
}else {
|
||||
|
||||
res && Modal.error({ content: res.message });
|
||||
}
|
||||
})
|
||||
|
|
@ -148,10 +158,10 @@ export default Form.create()(({ match, history, showNotification, form }) => {
|
|||
{
|
||||
helper('联系方式',
|
||||
'contactInfo',
|
||||
[{ required: true, message: "请输入联系方式" },
|
||||
[{ required: true, message: "请输入联系方式" },
|
||||
{ max: 100, message: '不能超过100字符' },
|
||||
{ validator: (rule,val,callback) =>{
|
||||
const pattern = /^((\+)?86|((\+)?86)?)0?1[3458]\d{9}$/;
|
||||
const pattern = /^((\+)?86|((\+)?86)?)0?1[3458]\d{9}$/;
|
||||
if(pattern.test(val)){
|
||||
callback();
|
||||
}else {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,10 @@ export default (props) => {
|
|||
const [technologyList, setTechnologyList] = useState([]);
|
||||
const [dealList, setDealList] = useState([]);
|
||||
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
setLoading(true);
|
||||
if (tab === '0' || tab === '7') {
|
||||
const params = {
|
||||
|
|
@ -264,4 +267,4 @@ export default (props) => {
|
|||
</div>
|
||||
</React.Fragment>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue