소스 검색

Merge branch '3.29' into dev

lanjianrong 4 년 전
부모
커밋
89be34e873
1개의 변경된 파일57개의 추가작업 그리고 18개의 파일을 삭제
  1. 57 18
      src/pages/Product/Road/Personal/index.jsx

+ 57 - 18
src/pages/Product/Road/Personal/index.jsx

@@ -67,8 +67,8 @@ const Personal = props => {
     },
     {
       title: '真实姓名',
-      dataIndex: 'real_name',
-      key: 'real_name',
+      dataIndex: 'realName',
+      key: 'realName',
       width: 100
     },
     {
@@ -137,22 +137,31 @@ const Personal = props => {
     },
     {
       title: '最近使用',
-      dataIndex: 'latestUsed',
-      key: 'latestUsed',
+      dataIndex: 'usedCptList',
+      key: 'usedCptList',
       width: 120,
       filters: true,
       filterMultiple: false,
       valueEnum: compilationv2.reduce((prev, curr) => {
         const obj = { ...prev }
-        if (curr._id) {
-          obj[curr._id] = {
+        if (curr.ID) {
+          obj[curr.ID] = {
             text: curr.name
           }
         }
         return obj
       }, {}),
-      renderText: (_, record) =>
-        record.latestUsedName && <Tag color="purple">{record.latestUsedName}</Tag>
+      renderText: (_, record) => (
+        <div className="children:m-2px">
+          {record.usedCptList.map(item => {
+            return (
+              <Tag color="purple" key={item.compilationID}>
+                {compilationv2?.find(i => i.ID === item.compilationID)?.name}
+              </Tag>
+            )
+          })}
+        </div>
+      )
     },
     {
       title: '地区',
@@ -171,8 +180,8 @@ const Personal = props => {
     },
     {
       title: '注册时间',
-      dataIndex: 'create_time',
-      key: 'create_time',
+      dataIndex: 'createTime',
+      key: 'createTime',
       sorter: true,
       ellipsis: true,
       width: 150,
@@ -180,15 +189,15 @@ const Personal = props => {
     },
     {
       title: '是否升级到专业版',
-      dataIndex: 'upGrade',
-      key: 'upGrade',
+      dataIndex: 'proCptList',
+      key: 'proCptList',
       width: 150,
       filters: true,
       filterMultiple: false,
       valueEnum: compilationv2.reduce((prev, curr) => {
         const obj = { ...prev }
-        if (curr._id) {
-          obj[curr._id] = {
+        if (curr.ID) {
+          obj[curr.ID] = {
             text: curr.name
           }
         }
@@ -196,18 +205,48 @@ const Personal = props => {
       }, {}),
       renderText: (_, record) => (
         <div className="children:m-2px">
-          {record.upgrade_list
-            .filter(item => item.isUpgrade)
+          {record.proCptList
+            .filter(item => item.activated)
             .map(item => {
               return (
                 <Tag color="purple" key={item.compilationID}>
-                  {compilationv2?.find(i => i._id === item.compilationID)?.name}
+                  {compilationv2?.find(i => i.ID === item.compilationID)?.name}
                 </Tag>
               )
             })}
         </div>
       )
     }
+    // {
+    //   title: '是否升级到专业版',
+    //   dataIndex: 'upGrade',
+    //   key: 'upGrade',
+    //   width: 150,
+    //   filters: true,
+    //   filterMultiple: false,
+    //   valueEnum: compilationv2.reduce((prev, curr) => {
+    //     const obj = { ...prev }
+    //     if (curr._id) {
+    //       obj[curr._id] = {
+    //         text: curr.name
+    //       }
+    //     }
+    //     return obj
+    //   }, {}),
+    //   renderText: (_, record) => (
+    //     <div className="children:m-2px">
+    //       {record.upgrade_list
+    //         .filter(item => item.isUpgrade)
+    //         .map(item => {
+    //           return (
+    //             <Tag color="purple" key={item.compilationID}>
+    //               {compilationv2?.find(i => i._id === item.compilationID)?.name}
+    //             </Tag>
+    //           )
+    //         })}
+    //     </div>
+    //   )
+    // }
   ]
   const handleSearch = value => {
     tRef.current?.reloadAndRest()
@@ -217,7 +256,7 @@ const Personal = props => {
     <div>
       <BasicTable
         actionRef={tRef}
-        rowKey={record => record._id}
+        rowKey={record => record.ID}
         columns={columns}
         params={state.params}
         request={async (params, sort, filter) => {