feat(模块): 添加了个很棒的功能
This commit is contained in:
parent
2a2a116a7e
commit
70d4f4cb3d
@ -53,6 +53,8 @@ const addQuestion = ({ parentRow, onRef, currentUser, showQuestionModal, setShow
|
||||
operator: currentUser?.operator,
|
||||
description: `${res.categoryId && categoryIdObj ? categoryIdObj[res.categoryId] : ''}`
|
||||
}
|
||||
console.log('req', req);
|
||||
|
||||
data = await handleEditQuestion(req)
|
||||
} else {
|
||||
req = {
|
||||
|
||||
@ -175,7 +175,10 @@ const examineQuestion: React.FC<{ currentUser: any }> = (props) => {
|
||||
search={{ span: 6 }}
|
||||
scroll={{ x: "100%", y: 'calc(100vh - 400px)' }}
|
||||
request={async (params) => {
|
||||
const data = await handleGetQuestionList()
|
||||
const req = {
|
||||
any: params?.title ? [{ key: "title", value: params?.title }] : undefined
|
||||
}
|
||||
const data = await handleGetQuestionList(req)
|
||||
console.log('data', data);
|
||||
|
||||
if (data && data.length > 0) {
|
||||
|
||||
@ -2,7 +2,7 @@ import request from "@/utils/request"
|
||||
|
||||
// 拿到问题列表接口
|
||||
export async function handleGetQuestionList(params?: any) {
|
||||
const data = await request.get('/questions', {params})
|
||||
const data = await request.post('/questions/search/many', params)
|
||||
if (data.code === 200) {
|
||||
return data.data
|
||||
}
|
||||
|
||||
@ -26,6 +26,11 @@ const examineRecord: React.FC<{ currentUser: any }> = (props) => {
|
||||
const [showDetail, setShowDetail] = useState<boolean>(false)
|
||||
// 判断是否点了出现的是异常处理的抽屉
|
||||
const [showAbnormal, setShowAbnormal] = useState<boolean>(false)
|
||||
const [columnsStateMap, setColumnsStateMap] = useState<any>({
|
||||
score: { show: false }
|
||||
})
|
||||
|
||||
|
||||
|
||||
const columns: any = [
|
||||
{
|
||||
@ -137,6 +142,14 @@ const examineRecord: React.FC<{ currentUser: any }> = (props) => {
|
||||
return str || ''
|
||||
}
|
||||
},
|
||||
{
|
||||
title: <div style={{ textAlign: 'center' }}>巡查总分</div>,
|
||||
dataIndex: "score",
|
||||
hideInSearch: true,
|
||||
valueType: 'digit',
|
||||
width: 100,
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: <div style={{ textAlign: 'center' }}>巡查时间</div>,
|
||||
dataIndex: "createdAt",
|
||||
@ -294,6 +307,10 @@ const examineRecord: React.FC<{ currentUser: any }> = (props) => {
|
||||
toolbar={{
|
||||
|
||||
}}
|
||||
columnsState={{
|
||||
value: columnsStateMap,
|
||||
onChange: setColumnsStateMap,
|
||||
}}
|
||||
>
|
||||
</ProTable>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user