zy-react-library 1.0.63 → 1.0.64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -126,8 +126,8 @@ function HiddenInfo(props) {
126
126
  column={1}
127
127
  labelStyle={{ width: 200 }}
128
128
  items={[
129
- { label: "整改部门", children: info.hiddenUserPresetsCO.deptName },
130
- { label: "整改人", children: info.hiddenUserPresetsCO.userName },
129
+ { label: "整改部门", children: info.hiddenUserPresetsCO.rectifyDeptName },
130
+ { label: "整改人", children: info.hiddenUserPresetsCO.rectifyUserName },
131
131
  ...(info.rectificationType === 2
132
132
  ? [
133
133
  { label: "整改期限", children: dayjs(info.hiddenUserPresetsCO.rectifyDeadline).format("YYYY-MM-DD") },
@@ -135,8 +135,8 @@ function HiddenInfo(props) {
135
135
  : []),
136
136
  ...(info.rectificationType === 1
137
137
  ? [
138
- { label: "验收部门", children: info.hiddenUserPresetsCO.deptName },
139
- { label: "验收人", children: info.hiddenUserPresetsCO.userName },
138
+ { label: "验收部门", children: info.hiddenUserPresetsCO.checkDeptName },
139
+ { label: "验收人", children: info.hiddenUserPresetsCO.checkUserName },
140
140
  ]
141
141
  : []),
142
142
  ]}
@@ -1,5 +1,6 @@
1
1
  import { tools } from "@cqsjjb/jjb-common-lib";
2
2
  import { useAntdTable } from "ahooks";
3
+ import useGetUrlQuery from "../useGetUrlQuery";
3
4
 
4
5
  const { query } = tools.router;
5
6
 
@@ -75,9 +76,10 @@ function setQuery(searchForm, pagination) {
75
76
  * 从 URL 中获取查询参数
76
77
  */
77
78
  function getQuery(keysStr, valuesStr) {
79
+ const query = useGetUrlQuery();
78
80
  // 将键值字符串分割为数组
79
- const keys = keysStr ? keysStr.split(",") : [];
80
- const values = valuesStr ? valuesStr.split(",") : [];
81
+ const keys = query[keysStr] ? query[keysStr].split(",") : [];
82
+ const values = query[valuesStr] ? query[valuesStr].split(",") : [];
81
83
 
82
84
  // 构建结果对象
83
85
  const resultMap = {};
@@ -119,8 +121,8 @@ function useTable(service, options) {
119
121
  } = restOptions;
120
122
 
121
123
  // 获取存储的查询条件
122
- const storageQueryCriteriaSearchForm = useStorageQueryCriteria ? getQuery(query.searchFormKeys, query.searchFormValues) : {};
123
- const storageQueryCriteriaPagination = useStorageQueryCriteria && usePagination ? getQuery(query.paginationKeys, query.paginationValues) : {};
124
+ const storageQueryCriteriaSearchForm = useStorageQueryCriteria ? getQuery("searchFormKeys", "searchFormValues") : {};
125
+ const storageQueryCriteriaPagination = useStorageQueryCriteria && usePagination ? getQuery("paginationKeys", "paginationValues") : {};
124
126
 
125
127
  // 确定实际使用的搜索表单和分页参数
126
128
  const actualSearchForm = Object.keys(storageQueryCriteriaSearchForm).length > 0 ? storageQueryCriteriaSearchForm : {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "zy-react-library",
3
3
  "private": false,
4
- "version": "1.0.63",
4
+ "version": "1.0.64",
5
5
  "type": "module",
6
6
  "description": "",
7
7
  "author": "LiuJiaNan",