diff --git a/src/military/expert/api.js b/src/military/expert/api.js index 1e6986141..048da61a6 100644 --- a/src/military/expert/api.js +++ b/src/military/expert/api.js @@ -18,6 +18,14 @@ export async function expertList(params) { } } +//删除专家 +export function deleteExpert(expertId) { + return fetch({ + url: `/api/experts/${expertId}?isDelete=1`, + method: 'delete' + }); +} + // 获取用户信息 export function getUserInfo() { return fetch({ diff --git a/src/military/expert/expertList/index.jsx b/src/military/expert/expertList/index.jsx index 0157151ea..21666b5f3 100644 --- a/src/military/expert/expertList/index.jsx +++ b/src/military/expert/expertList/index.jsx @@ -1,10 +1,10 @@ import React, { useState, useMemo, useEffect } from "react"; -import { Input, Select, Button, Form, Table, Upload, Modal } from 'antd'; +import { Input, Select, Button, Form, Table, Upload, Modal, Popconfirm, message } from 'antd'; import cookie from 'react-cookies'; import { exportExcel } from '../components/exportExcel.js'; import Paginationtable from "../../components/paginationTable"; import { Info } from '../../components/ModalFun'; -import { expertList } from "../api"; +import { expertList, deleteExpert } from "../api"; import { professionalType, reviewArea } from "../static"; import { httpUrl } from '../fetch'; @@ -38,12 +38,14 @@ function RegisterList({ showNotification }) { return [{ title: '姓名', dataIndex: 'expertName', - width: 75, + width: 85, key: 'expertName', fixed: 'left', - // render: (text, record) => { - // return record.user ? record.user.nickname || record.user.login : '' - // } + }, + { + title: '手机号码', + dataIndex: 'phone', + key: 'phone', }, { title: '最高学历', @@ -52,9 +54,13 @@ function RegisterList({ showNotification }) { width: 80, }, { - title: '手机号码', - dataIndex: 'phone', - key: 'phone', + title: '专家评估', + dataIndex: 'expertScore', + key: 'expertScore', + width: 80, + render: (text, record) => { + return text || '--' + } }, { title: '工作单位', @@ -186,6 +192,15 @@ function RegisterList({ showNotification }) { }) } }, + { + title: '操作', + dataIndex: 'id', + key: 'action', + fixed: 'right', + render: (text, record)=>{ + return { delExpert(text);}} okText="是" cancelText="否"> + } + } ]; }, []); @@ -233,6 +248,20 @@ function RegisterList({ showNotification }) { }); }, [download]); + // 删除专家 + const delExpert=(expertId)=>{ + setLoading(true); + deleteExpert(expertId).then(response=>{ + if(response && response.message === "删除专家成功"){ + message.success("删除成功"); + setReload(Math.random()); + }else{ + message.error("删除失败"); + } + }).finally(()=>{ + setLoading(false); + }) + } function beforeUpload(file) { const isExcel = file.type.indexOf('xlsx') || file.type.indexOf('xls') || file.type.indexOf('sheet'); @@ -350,7 +379,6 @@ function RegisterList({ showNotification }) { rowKey={(row) => row.id} /> - { @@ -561,9 +560,10 @@ export default Form.create()(({ match, history, showNotification, form, current_
提示:个人简介、职称证明、学术成果、荣誉称号都只能上传一个文件,建议上传zip或rar格式的压缩文件
- + {/* 专家: 修改,非专家: 提交 */} + {(!lastRegister || lastRegister.status !== 1) && } - + { history.goBack() }}>返回上一页

- + - +

任务信息

diff --git a/src/military/expert/selectExpert/index.jsx b/src/military/expert/selectExpert/index.jsx index 02854d8a7..68d8fb299 100644 --- a/src/military/expert/selectExpert/index.jsx +++ b/src/military/expert/selectExpert/index.jsx @@ -85,7 +85,7 @@ function SelectExpert(props) { align: 'center', }, { - title: '专家评分', + title: '专家评估', dataIndex: 'expertScore', align: 'center', render:(text,record)=>{ diff --git a/src/military/task/taskAdmin/index.jsx b/src/military/task/taskAdmin/index.jsx index f2ad6e641..80d8586a3 100644 --- a/src/military/task/taskAdmin/index.jsx +++ b/src/military/task/taskAdmin/index.jsx @@ -324,7 +324,7 @@ export default Form.create()(({ form, showNotification, match, history, state }) width: 260, }, { - title: '专家评分', + title: '专家评估', dataIndex: 'expertScore', align: 'center', render:(text,record)=>{