diff --git a/src/pages/examine/question/components/addQuestion.tsx b/src/pages/examine/question/components/addQuestion.tsx index d0b25a9..3b51802 100644 --- a/src/pages/examine/question/components/addQuestion.tsx +++ b/src/pages/examine/question/components/addQuestion.tsx @@ -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 = { diff --git a/src/pages/examine/question/index.tsx b/src/pages/examine/question/index.tsx index 3550560..276dae1 100644 --- a/src/pages/examine/question/index.tsx +++ b/src/pages/examine/question/index.tsx @@ -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) { diff --git a/src/pages/examine/question/service.ts b/src/pages/examine/question/service.ts index 8084414..3a42a52 100644 --- a/src/pages/examine/question/service.ts +++ b/src/pages/examine/question/service.ts @@ -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 } diff --git a/src/pages/examine/record/index.tsx b/src/pages/examine/record/index.tsx index 02a9bda..a7f4fdb 100644 --- a/src/pages/examine/record/index.tsx +++ b/src/pages/examine/record/index.tsx @@ -26,6 +26,11 @@ const examineRecord: React.FC<{ currentUser: any }> = (props) => { const [showDetail, setShowDetail] = useState(false) // 判断是否点了出现的是异常处理的抽屉 const [showAbnormal, setShowAbnormal] = useState(false) + const [columnsStateMap, setColumnsStateMap] = useState({ + score: { show: false } + }) + + const columns: any = [ { @@ -137,6 +142,14 @@ const examineRecord: React.FC<{ currentUser: any }> = (props) => { return str || '' } }, + { + title:
巡查总分
, + dataIndex: "score", + hideInSearch: true, + valueType: 'digit', + width: 100, + align: 'center', + }, { title:
巡查时间
, dataIndex: "createdAt", @@ -294,6 +307,10 @@ const examineRecord: React.FC<{ currentUser: any }> = (props) => { toolbar={{ }} + columnsState={{ + value: columnsStateMap, + onChange: setColumnsStateMap, + }} >