From 70d4f4cb3d314774819a9ce8f4585b054529a38e Mon Sep 17 00:00:00 2001 From: cclu <1106109051@qq.com> Date: Wed, 19 Mar 2025 19:23:47 +0800 Subject: [PATCH] =?UTF-8?q?=20feat(=E6=A8=A1=E5=9D=97):=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E4=BA=86=E4=B8=AA=E5=BE=88=E6=A3=92=E7=9A=84=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../examine/question/components/addQuestion.tsx | 2 ++ src/pages/examine/question/index.tsx | 5 ++++- src/pages/examine/question/service.ts | 2 +- src/pages/examine/record/index.tsx | 17 +++++++++++++++++ 4 files changed, 24 insertions(+), 2 deletions(-) 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, + }} >