lanjianrong 3 سال پیش
والد
کامیت
ae84abc973

+ 20 - 3
src/pages/Project/Verification/Detail/Flow/components/Drawer/index.tsx

@@ -1,5 +1,5 @@
 import { useState, useEffect, useContext, useMemo } from 'react'
-import { Button, Drawer, Radio, Tabs, Tooltip } from 'antd'
+import { Button, Drawer, message, Radio, Tabs, Tooltip } from 'antd'
 import { Actions, FlowContext } from '../../context'
 import type { RadioChangeEvent } from 'antd'
 import { ApprovalWay, ConfigureType, ParticipantMode } from '../../enum'
@@ -18,7 +18,8 @@ const FlowDrawer = () => {
   const [state, setState] = useState({
     institutionList: [],
     approvalWay: ApprovalWay.ACCOUNT,
-    accounts: []
+    accounts: [],
+    validityIDs: []
   })
 
   useEffect(() => {
@@ -61,6 +62,21 @@ const FlowDrawer = () => {
   }
   const handleOnOk = async () => {
     const { approvalWay, accounts } = state
+    if (!accounts.every(item => item.institutionID && item.ID)) {
+      setState({
+        ...state,
+        validityIDs: accounts.reduce((prev, curr) => {
+          if (!curr.institutionID || !curr.ID) {
+            prev.push(curr.uid)
+          }
+          return prev
+        }, [])
+      })
+      return
+    }
+    // if (!validate(accounts)) {
+    //   return message.error('当前流程信息配置不完整,请检查!')
+    // }
     const payload = {
       id: nodeID,
       node: {
@@ -128,7 +144,8 @@ const FlowDrawer = () => {
         <div
           className={[
             'shadow-base border rounded-md flex flex-col justify-between px-4 py-2 mt-6',
-            styles.participantCard
+            styles.participantCard,
+            state.validityIDs.includes(participant.uid) ? 'border-red-500' : ''
           ].join(' ')}
           key={participant.uid}>
           <div className="flex flex-row justify-between">

+ 7 - 5
src/pages/Project/Verification/Detail/Flow/components/Node/index.tsx

@@ -90,11 +90,13 @@ export const CommonNode = props => {
       <div className="shadow-card cursor-default p-1 bg-hex-1890ff rounded-lg node_content">
         <div className="relative text-light-500  p-1 flex justify-between items-center">
           <div className="leading-5 h-5 text-12px">审批人</div>
-          <div
-            className="remove_node w-24px h-24px bg-hex-ff4d4f align-middle"
-            onClick={removeNode}>
-            {!readPretty ? <CloseOutlined size={12} /> : null}
-          </div>
+          {!readPretty ? (
+            <div
+              className="remove_node w-24px h-24px bg-hex-ff4d4f align-middle"
+              onClick={removeNode}>
+              <CloseOutlined size={12} />
+            </div>
+          ) : null}
         </div>
         <div
           className="text-14px px-4px py-5px leading-22px text-black text-opacity-85 bg-white rounded-4px h-32px flex justify-between cursor-pointer"

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

@@ -52,7 +52,7 @@ const FlowList = () => {
     },
     {
       dataIndex: 'approval',
-      title: '审批名称',
+      title: '流程名称',
       onHeaderCell: () => ({ style: { textAlign: 'center' } }),
       renderText: (_, record) => (
         <span

+ 1 - 1
windi.config.ts

@@ -22,7 +22,7 @@ export default defineConfig({
       },
       boxShadow: {
         card: '0 0 13px 0 rgba(74, 53, 107, 0.08)',
-        base: '0 1px 1px 1px rgb(0 0 0 / 15%)'
+        base: '0px 6px 16px rgba(0, 0, 0, 0.08);'
       }
     }
   },