From b5c1614fe473330ceca8b7cff0f1802e19bd5039 Mon Sep 17 00:00:00 2001
From: Sanakey <714737083@qq.com>
Date: 星期一, 30 九月 2024 13:39:08 +0800
Subject: [PATCH] feat:添加部分线索接口,完善客户相关页面

---
 src/views/customer/components/tableData.tsx |  684 ++++++++++++++++----------------------------------------
 1 files changed, 200 insertions(+), 484 deletions(-)

diff --git a/src/views/customer/components/tableData.tsx b/src/views/customer/components/tableData.tsx
index 0dc938e..9c63e4c 100644
--- a/src/views/customer/components/tableData.tsx
+++ b/src/views/customer/components/tableData.tsx
@@ -1,56 +1,208 @@
-import { optionsListApi } from '@/api/demo/select';
-import { FormProps, FormSchema, BasicColumn } from '@/components/Table';
-import { VxeFormItemProps, VxeGridPropTypes } from '@/components/VxeTable';
-import { ref } from 'vue';
-import {Input} from 'ant-design-vue';
+
+import { FormProps,  BasicColumn } from '@/components/Table';
 import {treeOptionsListApi} from "@/api/demo/tree";
 
 export function getEditCellColumns(): BasicColumn[] {
   return [
     {
-      title: '鍏徃鍚嶇О',
-      dataIndex: 'name',
-      edit: true,
+      title: '瀹㈡埛鍚嶇О',
+      // defaultHidden: true,
+      dataIndex: 'cluesName',
       sorter: true,
-      editComponentProps: {
-        prefix: '$',
-      },
-      width: 200,
-      // filters:{
-      //   text: '鍏徃鍚嶇О',
-      //   value: 'name',
-      // }
-      // filterSearch: true,
+      width: 200
     },
     {
-      title: '瀹㈡埛鏍囩',
-      dataIndex: 'tags',
-      edit: true,
-      // editComponent: 'ApiSelect',
-      // editComponentProps: {
-      //   api: optionsListApi,
-      //   resultField: 'list',
-      //   labelField: 'name',
-      //   valueField: 'id',
-      // },
-      width: 200,
-      // editRender: ({ text }) => {
-      //   return h(Tag, { percent: Number(text) });
-      // },
-    },
-    {
-      title: '涓昏鑱旂郴浜�',
-      dataIndex: 'name1',
-      edit: true,
-      // 榛樿蹇呭~鏍¢獙
-      editRule: true,
+      title: '瀛樻。鏃堕棿',
+      dataIndex: 'archiveTime',
+      sorter: true,
       width: 200,
     },
     {
-      title: '鏈�杩戝姩鎬�',
-      dataIndex: 'name2',
+      title: '鐘舵�乮d',
+      dataIndex: 'statusId',
       width: 200,
     },
+    {
+      title: '鐘舵�佸唴瀹�',
+      dataIndex: 'status',
+      width: 200,
+    },
+    {
+      title: '璺熻繘鏃堕棿',
+      dataIndex: 'followUpTime',
+      width: 200,
+    },
+    {
+      title: '鏃犳晥绫诲瀷',
+      dataIndex: 'failType',
+      width: 200,
+    },
+    {
+      title: '鏃犳晥鐘舵��',
+      dataIndex: 'failStatus',
+      width: 200,
+    },
+    {
+      title: '鏃犳晥鐘舵�佸唴瀹�',
+      dataIndex: 'failStatusName',
+      width: 200,
+    },
+    {
+      title: '鏃犳晥鍘熷洜',
+      dataIndex: 'failReason',
+      width: 200,
+    },
+    {
+      title: '杩涘叆绉佹捣鏃堕棿',
+      dataIndex: 'privateTime',
+      width: 200,
+    },
+    {
+      title: '杩涘叆鍏捣鏃堕棿',
+      dataIndex: 'publicTime',
+      width: 200,
+    },
+    {
+      title: '鏄惁涓哄叕娴风嚎绱�',
+      dataIndex: 'isPublic',
+      width: 200,
+    },
+    {
+      title: '璇勫垎',
+      dataIndex: 'star',
+      width: 200,
+    },
+    {
+      title: '涓嬫璺熻繘鏃堕棿',
+      dataIndex: 'nextFollowUpTime',
+      width: 200,
+    },
+    {
+      title: '鏄惁鏈夐噸澶嶅唴瀹�',
+      dataIndex: 'duplicateFlag',
+      width: 200,
+    },
+    {
+      title: '鏍囩',
+      dataIndex: 'tagList',
+      width: 200,
+    },
+    {
+      title: '鍏徃缃戝潃',
+      dataIndex: 'homepage',
+      width: 200,
+    },
+    {
+      title: '绾跨储鏉ユ簮',
+      dataIndex: 'originList',
+      width: 200,
+    },
+    {
+      title: '绠�绉�',
+      dataIndex: 'shortName',
+      width: 200,
+    },
+    {
+      title: '鍥藉',
+      dataIndex: 'country',
+      width: 200,
+    },
+    {
+      title: '鐪佷唤',
+      dataIndex: 'province',
+      width: 200,
+    },
+    {
+      title: '鍦板尯',
+      dataIndex: 'city',
+      width: 200,
+    },
+    {
+      title: '鍏徃鍚嶇О',
+      dataIndex: 'corporate',
+      width: 200,
+    },
+    {
+      title: '鍏徃绫诲瀷',
+      dataIndex: 'bizType',
+      width: 200,
+    },
+    {
+      title: '鍦板尯鍙�',
+      dataIndex: 'telAreaCode',
+      width: 200,
+    },
+    {
+      title: '搴ф満',
+      dataIndex: 'tel',
+      width: 200,
+    },
+    {
+      title: '閲囪喘鎰忓悜',
+      dataIndex: 'intentionLevel',
+      width: 200,
+    },
+    {
+      title: '骞撮噰璐',
+      dataIndex: 'annualProcurement',
+      width: 200,
+    },
+    {
+      title: '鏃跺尯',
+      dataIndex: 'timezone',
+      width: 200,
+    },
+    {
+      title: '璇︾粏鍦板潃',
+      dataIndex: 'address',
+      width: 200,
+    },
+    {
+      title: '鎼滅储鍏抽敭瀛�',
+      dataIndex: 'adKeyword',
+      width: 200,
+    },
+    {
+      title: '鍥剧墖',
+      dataIndex: 'imageList',
+      width: 200,
+    },
+    {
+      title: '绾跨储澶囨敞',
+      dataIndex: 'hdmeno',
+      width: 200,
+    },
+    {
+      title: '瑙勬ā',
+      dataIndex: 'scaleId',
+      width: 200,
+    },
+    {
+      title: '涓氬姟鍛�',
+      dataIndex: 'seller',
+      width: 200,
+    },
+    {
+      title: '璁块棶鏉ユ簮',
+      dataIndex: 'inquiryOrigin',
+      width: 200,
+    },
+    {
+      title: '涓昏惀浜у搧',
+      dataIndex: 'categoryIds',
+      width: 200,
+    },
+    {
+      title: '璁块棶IP鎵�鍦ㄥ湴',
+      dataIndex: 'inquiryCountry',
+      width: 200,
+    },
+    {
+      title: '鏄惁宸插叧娉�',
+      dataIndex: 'pinFlag',
+      width: 200,
+    },
+
     {
       title: '鏈�杩戣仈绯讳汉',
       dataIndex: 'id',
@@ -97,253 +249,20 @@
 
 
 
-export function getBasicColumns(): BasicColumn[] {
-  return [
-    {
-      title: 'ID',
-      dataIndex: 'id',
-      fixed: 'left',
-      width: 200,
-    },
-    {
-      title: '濮撳悕',
-      dataIndex: 'name',
-      width: 150,
-      filters: [
-        { text: 'Male', value: 'male' },
-        { text: 'Female', value: 'female' },
-      ],
-    },
-    {
-      title: '鍦板潃',
-      dataIndex: 'address',
-    },
-    {
-      title: '缂栧彿',
-      dataIndex: 'no',
-      width: 150,
-      sorter: true,
-      defaultHidden: true,
-    },
-    {
-      title: '寮�濮嬫椂闂�',
-      width: 150,
-      sorter: true,
-      dataIndex: 'beginTime',
-    },
-    {
-      title: '缁撴潫鏃堕棿',
-      width: 150,
-      sorter: true,
-      dataIndex: 'endTime',
-    },
-  ];
-}
-
-export function getBasicShortColumns(): BasicColumn[] {
-  return [
-    {
-      title: 'ID',
-      width: 150,
-      dataIndex: 'id',
-      sorter: true,
-      sortOrder: 'ascend',
-    },
-    {
-      title: '濮撳悕',
-      dataIndex: 'name',
-      width: 120,
-    },
-    {
-      title: '鍦板潃',
-      dataIndex: 'address',
-    },
-    {
-      title: '缂栧彿',
-      dataIndex: 'no',
-      width: 80,
-    },
-  ];
-}
-
-export function getMultipleHeaderColumns(): BasicColumn[] {
-  const testRef = ref('濮撳悕:');
-  return [
-    {
-      title: 'ID',
-      dataIndex: 'id',
-      width: 200,
-    },
-    {
-      title: '濮撳悕',
-      customHeaderRender() {
-        return (
-          <Input placeholder="杈撳叆鍊� 鏇存柊 鑷畾涔塼itle" size="small" v-model:value={testRef.value} />
-        );
-      },
-      dataIndex: 'name',
-      width: 120,
-    },
-    {
-      title: '鍦板潃',
-      dataIndex: 'address',
-      sorter: true,
-      children: [
-        {
-          title: '缂栧彿',
-          customHeaderRender(column) {
-            // 銆愯嚜瀹氫箟娓叉煋鐨勩��
-            return (
-              <div>
-                _ <span style="background: #f00; color: #fff;">{testRef.value}</span> _
-                {column.customTitle}
-              </div>
-            );
-          },
-          dataIndex: 'no',
-          width: 120,
-          filters: [
-            { text: 'Male', value: 'male', children: [] },
-            { text: 'Female', value: 'female', children: [] },
-          ],
-        },
-
-        {
-          title: '寮�濮嬫椂闂�',
-          dataIndex: 'beginTime',
-          width: 120,
-        },
-        {
-          title: '缁撴潫鏃堕棿',
-          dataIndex: 'endTime',
-          width: 120,
-        },
-      ],
-    },
-  ];
-}
-
-export function getCustomHeaderColumns(): BasicColumn[] {
-  return [
-    {
-      title: 'ID',
-      dataIndex: 'id',
-      helpMessage: 'headerHelpMessage鏂瑰紡1',
-      width: 200,
-    },
-    {
-      // title: '濮撳悕',
-      dataIndex: 'name',
-      width: 120,
-    },
-    {
-      // title: '鍦板潃',
-      dataIndex: 'address',
-      width: 120,
-      sorter: true,
-    },
-
-    {
-      title: '缂栧彿',
-      dataIndex: 'no',
-      width: 120,
-      filters: [
-        { text: 'Male', value: 'male', children: [] },
-        { text: 'Female', value: 'female', children: [] },
-      ],
-    },
-    {
-      title: '寮�濮嬫椂闂�',
-      dataIndex: 'beginTime',
-      width: 120,
-    },
-    {
-      title: '缁撴潫鏃堕棿',
-      dataIndex: 'endTime',
-      width: 120,
-    },
-  ];
-}
-
-const cellContent = (_, index) => ({
-  colSpan: index === 9 ? 0 : 1,
-});
-
-export function getMergeHeaderColumns(): BasicColumn[] {
-  return [
-    {
-      title: 'ID',
-      dataIndex: 'id',
-      width: 300,
-      customCell: (_, index) => ({
-        colSpan: index === 9 ? 6 : 1,
-      }),
-    },
-    {
-      title: '濮撳悕',
-      dataIndex: 'name',
-      width: 300,
-      customCell: cellContent,
-    },
-    {
-      title: '鍦板潃',
-      dataIndex: 'address',
-      colSpan: 2,
-      width: 120,
-      sorter: true,
-      customCell: (_, index) => ({
-        rowSpan: index === 2 ? 2 : 1,
-        colSpan: index === 3 || index === 9 ? 0 : 1,
-      }),
-    },
-    {
-      title: '缂栧彿',
-      dataIndex: 'no',
-      colSpan: 0,
-      filters: [
-        { text: 'Male', value: 'male', children: [] },
-        { text: 'Female', value: 'female', children: [] },
-      ],
-      customCell: cellContent,
-    },
-    {
-      title: '寮�濮嬫椂闂�',
-      dataIndex: 'beginTime',
-      width: 200,
-      customCell: cellContent,
-    },
-    {
-      title: '缁撴潫鏃堕棿',
-      dataIndex: 'endTime',
-      width: 200,
-      customCell: cellContent,
-    },
-  ];
-}
-export const getAdvanceSchema = (itemNumber = 6): FormSchema[] => {
-  const arr: FormSchema[] = [];
-  for (let index = 0; index < itemNumber; index++) {
-    arr.push({
-      field: `field${index}`,
-      label: `瀛楁${index}`,
-      component: 'Input',
-      colProps: {
-        xl: 12,
-        xxl: 8,
-      },
-    });
-  }
-  return arr;
-};
 export function getFormConfig(): Partial<FormProps> {
   return {
     labelWidth: 100,
+    layout: 'horizontal',
+    rowProps: {
+      justify: 'end',
+    },
+    showResetButton: false,
+    showSubmitButton: false,
     schemas: [
-      ...getAdvanceSchema(5),
       {
         field: `field11`,
-        label: `Slot绀轰緥`,
-        slot: 'custom',
+        label: `鎼滅储`,
+        component: 'Input',
         colProps: {
           xl: 12,
           xxl: 8,
@@ -352,206 +271,3 @@
     ],
   };
 }
-export function getBasicData() {
-  return (() => {
-    const arr: any = [];
-    for (let index = 0; index < 40; index++) {
-      arr.push({
-        id: `${index}`,
-        name: 'John Brown',
-        age: `1${index}`,
-        no: `${index + 10}`,
-        address: 'New York No. 1 Lake ParkNew York No. 1 Lake Park',
-        beginTime: new Date().toLocaleString(),
-        endTime: new Date().toLocaleString(),
-      });
-    }
-    return arr;
-  })();
-}
-
-export function getTreeTableData() {
-  return (() => {
-    const arr: any = [];
-    for (let index = 0; index < 40; index++) {
-      arr.push({
-        id: `${index}`,
-        name: 'John Brown',
-        age: `1${index}`,
-        no: `${index + 10}`,
-        address: 'New York No. 1 Lake ParkNew York No. 1 Lake Park',
-        beginTime: new Date().toLocaleString(),
-        endTime: new Date().toLocaleString(),
-        children: [
-          {
-            id: `l2-${index}-1`,
-            name: 'John Brown',
-            age: `1`,
-            no: `${index + 10}`,
-            address: 'New York No. 1 Lake ParkNew York No. 1 Lake Park',
-            beginTime: new Date().toLocaleString(),
-            endTime: new Date().toLocaleString(),
-            children: [
-              {
-                id: `l3-${index}-1-1`,
-                name: 'John Brown',
-                age: `11`,
-                no: `11`,
-                address: 'New York No. 1 Lake ParkNew York No. 1 Lake Park',
-                beginTime: new Date().toLocaleString(),
-                endTime: new Date().toLocaleString(),
-              },
-              {
-                id: `l3-${index}-1-2`,
-                name: 'John Brown',
-                age: `12`,
-                no: `12`,
-                address: 'New York No. 1 Lake ParkNew York No. 1 Lake Park',
-                beginTime: new Date().toLocaleString(),
-                endTime: new Date().toLocaleString(),
-              },
-            ],
-          },
-          {
-            id: `l2-${index}-2`,
-            name: 'John Brown',
-            age: `2`,
-            no: `${index + 10}`,
-            address: 'New York No. 1 Lake ParkNew York No. 1 Lake Park',
-            beginTime: new Date().toLocaleString(),
-            endTime: new Date().toLocaleString(),
-            children: [
-              {
-                id: `l3-${index}-2-1`,
-                name: 'John Brown',
-                age: `21`,
-                no: `21`,
-                address: 'New York No. 1 Lake ParkNew York No. 1 Lake Park',
-                beginTime: new Date().toLocaleString(),
-                endTime: new Date().toLocaleString(),
-              },
-              {
-                id: `l3-${index}-2-2`,
-                name: 'John Brown',
-                age: `22`,
-                no: `22`,
-                address: 'New York No. 1 Lake ParkNew York No. 1 Lake Park',
-                beginTime: new Date().toLocaleString(),
-                endTime: new Date().toLocaleString(),
-              },
-            ],
-          },
-        ],
-      });
-    }
-    return arr;
-  })();
-}
-
-export const vxeTableColumns: VxeGridPropTypes.Columns = [
-  {
-    title: '搴忓彿',
-    type: 'seq',
-    fixed: 'left',
-    width: '50',
-    align: 'center',
-  },
-  {
-    title: '鍥哄畾鍒�',
-    field: 'name',
-    width: 150,
-    showOverflow: 'tooltip',
-    fixed: 'left',
-  },
-  {
-    title: '鑷�傚簲鍒�',
-    field: 'address',
-  },
-  {
-    title: '鑷畾涔夊垪(鑷畾涔夊鍑�)',
-    field: 'no',
-    width: 200,
-    showOverflow: 'tooltip',
-    align: 'center',
-    slots: {
-      default: ({ row }) => {
-        const text = `鑷畾涔�${row.no}`;
-        return [<div class="text-red-500">{text}</div>];
-      },
-    },
-    exportMethod: ({ row }) => {
-      return `鑷畾涔�${row.no}瀵煎嚭`;
-    },
-  },
-  {
-    title: '鑷畾涔夌紪杈�',
-    width: 150,
-    field: 'name1',
-    align: 'center',
-    editRender: {
-      name: 'AInput',
-      placeholder: '璇风偣鍑昏緭鍏�',
-    },
-  },
-  {
-    title: '寮�濮嬫椂闂�',
-    width: 150,
-    field: 'beginTime',
-    showOverflow: 'tooltip',
-    align: 'center',
-  },
-  {
-    title: '缁撴潫鏃堕棿',
-    width: 150,
-    field: 'endTime',
-    showOverflow: 'tooltip',
-    align: 'center',
-  },
-  {
-    width: 160,
-    title: '鎿嶄綔',
-    align: 'center',
-    slots: { default: 'action' },
-    fixed: 'right',
-  },
-];
-
-export const vxeTableFormSchema: VxeFormItemProps[] = [
-  {
-    field: 'field0',
-    title: 'field0',
-    itemRender: {
-      name: 'AInput',
-    },
-    span: 6,
-  },
-  {
-    field: 'field1',
-    title: 'field1',
-    itemRender: {
-      name: 'AApiSelect',
-      props: {
-        api: optionsListApi,
-        resultField: 'list',
-        labelField: 'name',
-        valueField: 'id',
-      },
-    },
-    span: 6,
-  },
-  {
-    span: 12,
-    align: 'right',
-    className: '!pr-0',
-    itemRender: {
-      name: 'AButtonGroup',
-      children: [
-        {
-          props: { type: 'primary', content: '鏌ヨ', htmlType: 'submit' },
-          attrs: { class: 'mr-2' },
-        },
-        { props: { type: 'default', htmlType: 'reset', content: '閲嶇疆' } },
-      ],
-    },
-  },
-];

--
Gitblit v1.8.0