lisenzhou 2 yıl önce
ebeveyn
işleme
f7d5d8505f

+ 1
- 1
src/pages/guarantee/personnel/edit/index.jsx Dosyayı Görüntüle

58
           labelCol={{ span: 8 }}
58
           labelCol={{ span: 8 }}
59
           wrapperCol={{ span: 12 }}
59
           wrapperCol={{ span: 12 }}
60
           onFinish={onFinish}
60
           onFinish={onFinish}
61
-          initialValues={{ status: 0 }}
61
+          initialValues={{ orgId:Number(orgId)||null }}
62
           submitter={{
62
           submitter={{
63
             searchConfig: {
63
             searchConfig: {
64
               resetText: "返回",
64
               resetText: "返回",

+ 13
- 12
src/pages/guarantee/personnel/list/index.jsx Dosyayı Görüntüle

21
   useEffect(() => {
21
   useEffect(() => {
22
     if (id) {
22
     if (id) {
23
       console.log(formRef, "formRefformRef");
23
       console.log(formRef, "formRefformRef");
24
-      formRef?.current?.setFieldValue('orgId', Number(id));
24
+      formRef?.current?.setFieldValue("orgId", Number(id));
25
       formRef?.current?.submit();
25
       formRef?.current?.submit();
26
-      
26
+
27
       // setTimeout(()=>{
27
       // setTimeout(()=>{
28
       //   actionRef.current.reload();
28
       //   actionRef.current.reload();
29
       // },1000)
29
       // },1000)
125
         // params={{ orgId: id }}
125
         // params={{ orgId: id }}
126
         rowKey="id"
126
         rowKey="id"
127
         toolBarRender={() => [
127
         toolBarRender={() => [
128
-
129
-            <Button
130
-              key="2"
131
-              type="primary"
132
-              onClick={() => {
133
-                navigate(`/task/guarantee/personnel/edit?orgId=${id}`);
134
-              }}
135
-            >
136
-              新增
137
-            </Button>
128
+          <Button
129
+            key="2"
130
+            type="primary"
131
+            onClick={() => {
132
+              navigate(
133
+                "/task/guarantee/personnel/edit" + (id ? `?orgId=${id}` : "")
134
+              );
135
+            }}
136
+          >
137
+            新增
138
+          </Button>,
138
         ]}
139
         ]}
139
         request={queryTable(getCooperationPersonList)}
140
         request={queryTable(getCooperationPersonList)}
140
         columns={columns}
141
         columns={columns}

+ 1
- 1
src/routes/routes.jsx Dosyayı Görüntüle

156
         path: "guarantee/personnel/list",
156
         path: "guarantee/personnel/list",
157
         element: <GuaranteePersonnelList />,
157
         element: <GuaranteePersonnelList />,
158
         meta: {
158
         meta: {
159
-          title: "社会保障机构-人员管理",
159
+          title: "机构人员",
160
           // permission: 'guaranteeTask.guarantee',
160
           // permission: 'guaranteeTask.guarantee',
161
         },
161
         },
162
       },
162
       },