Parcourir la source

feat: 修复巡检巡检字段拼写错误

lanjianrong il y a 4 ans
Parent
commit
f949c7e738

+ 9 - 9
src/pages/Quality/Content/Info/Detail/index.tsx

@@ -63,14 +63,14 @@ const Detail: React.FC<RouteComponentProps> = props => {
     auditHistory: [],
     rectifiedInfo: [],
     latestAuditor: {
-      audit_id: '',
-      audit_order: 0,
-      bidsection_id: '',
-      data_id: '',
-      data_type: 0,
+      auditId: '',
+      auditOrder: 0,
+      bidsectionId: '',
+      dataId: '',
+      dataType: 0,
       id: '',
       progress: '',
-      project_id: '',
+      projectId: '',
       status: 0
     },
     times: 0
@@ -221,8 +221,8 @@ const Detail: React.FC<RouteComponentProps> = props => {
     }
   }
   const renderHeaderBtn = (status: number) => {
-    if (!detail.latestAuditor.audit_id && userStore.userInfo.id !== detail.uid) return null
-    if (detail.latestAuditor.audit_id && userStore.userInfo.id !== detail.latestAuditor.audit_id) return null
+    if (!detail.latestAuditor.auditId && userStore.userInfo.id !== detail.uid) return null
+    if (detail.latestAuditor.auditId && userStore.userInfo.id !== detail.latestAuditor.auditId) return null
     if (!status) {
       return (
         <div className="pi-flex-row pi-align-center">
@@ -350,7 +350,7 @@ const Detail: React.FC<RouteComponentProps> = props => {
               </tr>
             </tbody>
           </table>
-          {detail.status === auditProgress.checked && detail.latestAuditor.audit_id === userStore.userInfo.id ? (
+          {detail.status === auditProgress.checked && detail.latestAuditor.auditId === userStore.userInfo.id ? (
             <table className="pi-table pi-bordered">
               <thead>
                 <tr>

+ 13 - 12
src/pages/Safe/Content/Info/Detail/index.tsx

@@ -63,14 +63,14 @@ const Detail: React.FC<RouteComponentProps> = props => {
     auditHistory: [],
     rectifiedInfo: [],
     latestAuditor: {
-      audit_id: '',
-      audit_order: 0,
-      bidsection_id: '',
-      data_id: '',
-      data_type: 0,
+      auditId: '',
+      auditOrder: 0,
+      bidsectionId: '',
+      dataId: '',
+      dataType: 0,
       id: '',
       progress: '',
-      project_id: '',
+      projectId: '',
       status: 0
     },
     times: 0
@@ -120,7 +120,7 @@ const Detail: React.FC<RouteComponentProps> = props => {
   }
 
   const addAuditor = (type: string, user: iUserInfo) => {
-    if (detail.auditors.find(item => item.progress === (type === 'check' ? '0' : '2') && item.audit_id === user.id)) {
+    if (detail.auditors.find(item => item.progress === (type === 'check' ? '0' : '2') && item.auditId === user.id)) {
       return message.error('该审批组下已存在该审批人,请勿重复添加!')
     }
     if (type === 'check') {
@@ -144,9 +144,9 @@ const Detail: React.FC<RouteComponentProps> = props => {
       const len = detail.auditors.filter((item: iAuditor) => item.progress === '2').length
       newAuditors.push({
         id: '',
-        audit_id: user.id,
+        auditId: user.id,
         mobile: '',
-        audit_order: len + 1,
+        auditOrder: len + 1,
         position: user.position,
         progress: '2',
         name: user.name,
@@ -222,8 +222,8 @@ const Detail: React.FC<RouteComponentProps> = props => {
   }
   const renderHeaderBtn = (status: number) => {
 
-    if (!detail.latestAuditor.audit_id && userStore.userInfo.id !== detail.uid) return null
-    if (detail.latestAuditor.audit_id && userStore.userInfo.id !== detail.latestAuditor.audit_id) return null
+    if (!detail.latestAuditor.auditId && userStore.userInfo.id !== detail.uid) return null
+    if (detail.latestAuditor.auditId && userStore.userInfo.id !== detail.latestAuditor.auditId) return null
     if (!status) {
       return (
         <div className="pi-flex-row pi-align-center">
@@ -234,6 +234,7 @@ const Detail: React.FC<RouteComponentProps> = props => {
         </div>
       )
     } else if (status === auditProgress.checking || status === auditProgress.checkNo) {
+
       return (
         <div className="pi-flex-row pi-align-center">
           <Button type="primary" danger size="small" onClick={() => btnClick('close')}>关闭</Button>
@@ -320,7 +321,7 @@ const Detail: React.FC<RouteComponentProps> = props => {
             </tbody>
           </table>
           {
-            detail.status === auditProgress.checked && detail.latestAuditor.audit_id === userStore.userInfo.id ?
+            detail.status === auditProgress.checked && detail.latestAuditor.auditId === userStore.userInfo.id ?
               <table className="pi-table pi-bordered">
                 <thead>
                   <tr>

+ 6 - 6
src/types/safe.d.ts

@@ -28,14 +28,14 @@ export interface iRectifiedState {
 }
 
 export interface iLatestAuditorState {
-  audit_id: string;
-  audit_order: number;
-  bidsection_id: string;
-  data_id: string;
-  data_type: number;
+  auditId: string;
+  auditOrder: number;
+  bidsectionId: string;
+  dataId: string;
+  dataType: number;
   id: string;
   progress: string;
-  project_id: string;
+  projectId: string;
   status: number;
 }