diff --git a/components/HiddenInfo/gwj/index.js b/components/HiddenInfo/gwj/index.js index abeef79..04e4a3f 100644 --- a/components/HiddenInfo/gwj/index.js +++ b/components/HiddenInfo/gwj/index.js @@ -126,8 +126,8 @@ function HiddenInfo(props) { column={1} labelStyle={{ width: 200 }} items={[ - { label: "整改部门", children: info.hiddenUserPresetsCO.deptName }, - { label: "整改人", children: info.hiddenUserPresetsCO.userName }, + { label: "整改部门", children: info.hiddenUserPresetsCO.rectifyDeptName }, + { label: "整改人", children: info.hiddenUserPresetsCO.rectifyUserName }, ...(info.rectificationType === 2 ? [ { label: "整改期限", children: dayjs(info.hiddenUserPresetsCO.rectifyDeadline).format("YYYY-MM-DD") }, @@ -135,8 +135,8 @@ function HiddenInfo(props) { : []), ...(info.rectificationType === 1 ? [ - { label: "验收部门", children: info.hiddenUserPresetsCO.deptName }, - { label: "验收人", children: info.hiddenUserPresetsCO.userName }, + { label: "验收部门", children: info.hiddenUserPresetsCO.checkDeptName }, + { label: "验收人", children: info.hiddenUserPresetsCO.checkUserName }, ] : []), ]} diff --git a/hooks/useTable/index.js b/hooks/useTable/index.js index 0783bb5..f6d2b51 100644 --- a/hooks/useTable/index.js +++ b/hooks/useTable/index.js @@ -1,5 +1,6 @@ import { tools } from "@cqsjjb/jjb-common-lib"; import { useAntdTable } from "ahooks"; +import useGetUrlQuery from "../useGetUrlQuery"; const { query } = tools.router; @@ -75,9 +76,10 @@ function setQuery(searchForm, pagination) { * 从 URL 中获取查询参数 */ function getQuery(keysStr, valuesStr) { + const query = useGetUrlQuery(); // 将键值字符串分割为数组 - const keys = keysStr ? keysStr.split(",") : []; - const values = valuesStr ? valuesStr.split(",") : []; + const keys = query[keysStr] ? query[keysStr].split(",") : []; + const values = query[valuesStr] ? query[valuesStr].split(",") : []; // 构建结果对象 const resultMap = {}; @@ -119,8 +121,8 @@ function useTable(service, options) { } = restOptions; // 获取存储的查询条件 - const storageQueryCriteriaSearchForm = useStorageQueryCriteria ? getQuery(query.searchFormKeys, query.searchFormValues) : {}; - const storageQueryCriteriaPagination = useStorageQueryCriteria && usePagination ? getQuery(query.paginationKeys, query.paginationValues) : {}; + const storageQueryCriteriaSearchForm = useStorageQueryCriteria ? getQuery("searchFormKeys", "searchFormValues") : {}; + const storageQueryCriteriaPagination = useStorageQueryCriteria && usePagination ? getQuery("paginationKeys", "paginationValues") : {}; // 确定实际使用的搜索表单和分页参数 const actualSearchForm = Object.keys(storageQueryCriteriaSearchForm).length > 0 ? storageQueryCriteriaSearchForm : {};