lanjianrong 3 éve
szülő
commit
0d140d3cab

+ 1 - 1
src/locales/zh-CN/menu.ts

@@ -20,7 +20,7 @@ export default {
   'menu.project.management.list': '项目列表',
   'menu.project.management.detail': '项目详情',
   'menu.project.created': '项目创建人',
-  'menu.project.verification': '审批流程',
+  'menu.project.verification': '审批流程模板',
   'menu.institutions': '企事业单位',
   'menu.institutions.company': '单位管理',
   'menu.institutions.staff': '人员管理',

+ 1 - 0
src/pages/Project/Management/Detail/components/AuditPerm.tsx

@@ -60,6 +60,7 @@ const AuditPerm: React.FC<AuditPermProps> = ({ dataID, defaultFormData, initFn }
             label="审批流程"
             placeholder="请选择审批流程"
             options={approvalList}
+            rules={[{ required: true, message: '请选择审批流程' }]}
           />
         </ProForm>
       </div>

+ 15 - 15
src/pages/Project/Verification/index.tsx

@@ -45,13 +45,13 @@ const FlowList = () => {
   //   }
   // })
 
-  const { run: tryPublish } = useRequest(publishApproval, {
-    manual: true,
-    onSuccess() {
-      message.success('')
-      tRef.current?.reload()
-    }
-  })
+  // const { run: tryPublish } = useRequest(publishApproval, {
+  //   manual: true,
+  //   onSuccess() {
+  //     message.success('')
+  //     tRef.current?.reload()
+  //   }
+  // })
   const { run: tryUpdate } = useRequest(saveApproval, {
     manual: true,
     onSuccess: () => {
@@ -66,7 +66,7 @@ const FlowList = () => {
     // },
     {
       dataIndex: 'approval',
-      title: '流程名称',
+      title: '模板名称',
       onHeaderCell: () => ({ style: { textAlign: 'center' } }),
       renderText: (_, record) => (
         <span
@@ -75,7 +75,7 @@ const FlowList = () => {
             setState({
               ...state,
               visible: true,
-              current: record.approval
+              current: { ...record.approval, readPretty: true }
             })
           }}>
           {record.approval?.name}
@@ -107,13 +107,13 @@ const FlowList = () => {
           <span
             className="pr-2 text-primary cursor-pointer hover:text-hex-967bbd"
             onClick={() => {
-              setState({ ...state, modalType: 'update', modalVisible: true })
-
-              setTimeout(() => {
-                formRef.current?.setFieldsValue({ ID: record.ID, name: record.approval?.name })
-              }, 80)
+              setState({
+                ...state,
+                visible: true,
+                current: record.approval
+              })
             }}>
-            编辑流程名称
+            编辑流程
           </span>
           {/* <span
             className="px-2 text-primary hover:cursor-pointer hover:text-blue-600"