luzhenxing 2 месяцев назад
Родитель
Сommit
873e209638

+ 0 - 6
src/api/wechat/model/whatsappModel.ts

@@ -11,7 +11,6 @@ export interface WhatsappInfo {
   ak?: string;
   sk?: string;
   callback?: string;
-  wxid?: string;
   account?: string;
   nickname?: string;
   phone?: string;
@@ -19,14 +18,9 @@ export interface WhatsappInfo {
   agentId?: number;
   apiBase?: string;
   apiKey?: string;
-  allowList?: []ContactInfo;
-  groupAllowList?: []ContactInfo;
-  blockList?: []ContactInfo;
-  groupBlockList?: []ContactInfo;
 }
 
 /**
  *  @description: Whatsapp list response
  */
-
 export type WhatsappListResp = BaseListResp<WhatsappInfo>;

+ 24 - 24
src/locales/lang/zh-CN/wechat.ts

@@ -266,34 +266,34 @@ export default {
     labelTaggingList: '标签 列表',
   },
   whatsapp: {
-    status: 'Status',
-    ak: 'Ak',
-    sk: 'Sk',
-    callback: 'Callback',
-    wxid: 'Wxid',
-    account: 'Account',
-    nickname: 'Nickname',
-    phone: 'Phone',
-    organizationId: 'OrganizationId',
-    agentId: 'AgentId',
-    apiBase: 'ApiBase',
-    apiKey: 'ApiKey',
-    allowList: 'AllowList',
-    groupAllowList: 'GroupAllowList',
-    blockList: 'BlockList',
-    groupBlockList: 'GroupBlockList',
+    status: '状态',
+    ak: '访问密钥',
+    sk: '密钥',
+    callback: '回调地址',
+    wxid: '微信ID',
+    account: '账号',
+    nickname: '昵称',
+    phone: '电话',
+    organizationId: '组织ID',
+    agentId: '代理ID',
+    apiBase: 'API地址',
+    apiKey: 'API密钥',
+    allowList: '白名单',
+    groupAllowList: '群组白名单',
+    blockList: '黑名单',
+    groupBlockList: '群组黑名单',
     addWhatsapp: '添加 Whatsapp',
     editWhatsapp: '编辑 Whatsapp',
     whatsappList: 'Whatsapp 列表',
   },
   creditBalance: {
-    userId: 'UserId',
-    balance: 'Balance',
-    status: 'Status',
-    organizationId: 'OrganizationId',
-    user: 'User',
-    addCreditBalance: '添加 CreditBalance',
-    editCreditBalance: '编辑 CreditBalance',
-    creditBalanceList: 'CreditBalance 列表',
+    userId: '用户ID',
+    balance: '余额',
+    status: '状态',
+    organizationId: '组织ID',
+    user: '用户',
+    addCreditBalance: '添加余额',
+    editCreditBalance: '编辑余额',
+    creditBalanceList: '余额列表',
   },
 };

+ 5 - 5
src/views/wechat/credit_balance/index.vue

@@ -22,11 +22,11 @@
           <TableAction
             :actions="[
               {
-                icon: 'clarity:note-edit-line',
+                label: t('common.edit'),
                 onClick: handleEdit.bind(null, record),
               },
               {
-                icon: 'ant-design:delete-outlined',
+                label: t('common.delete'),
                 color: 'error',
                 popConfirm: {
                   title: t('common.deleteConfirm'),
@@ -79,15 +79,15 @@
         showIndexColumn: false,
         clickToRowSelect: false,
         actionColumn: {
-          width: 30,
+          width: 120,
           title: t('common.action'),
           dataIndex: 'action',
-          fixed: undefined,
+          fixed: 'right',
         },
         rowKey: 'id',
         rowSelection: {
           type: 'checkbox',
-          columnWidth: 20,
+          columnWidth: 40,
           onChange: (selectedRowKeys, _selectedRows) => {
             selectedIds.value = selectedRowKeys as number[];
             showDeleteButton.value = selectedRowKeys.length > 0;

+ 5 - 5
src/views/wechat/whatsapp/index.vue

@@ -22,11 +22,11 @@
           <TableAction
             :actions="[
               {
-                icon: 'clarity:note-edit-line',
+                label: t('common.edit'),
                 onClick: handleEdit.bind(null, record),
               },
               {
-                icon: 'ant-design:delete-outlined',
+                label: t('common.delete'),
                 color: 'error',
                 popConfirm: {
                   title: t('common.deleteConfirm'),
@@ -79,15 +79,15 @@
         showIndexColumn: false,
         clickToRowSelect: false,
         actionColumn: {
-          width: 30,
+          width: 120,
           title: t('common.action'),
           dataIndex: 'action',
-          fixed: undefined,
+          fixed: 'right',
         },
         rowKey: 'id',
         rowSelection: {
           type: 'checkbox',
-          columnWidth: 20,
+          columnWidth: 40,
           onChange: (selectedRowKeys, _selectedRows) => {
             selectedIds.value = selectedRowKeys as number[];
             showDeleteButton.value = selectedRowKeys.length > 0;

+ 2 - 57
src/views/wechat/whatsapp/whatsapp.data.ts

@@ -24,11 +24,6 @@ export const columns: BasicColumn[] = [
     width: 100,
   },
   {
-    title: t('wechat.whatsapp.wxid'),
-    dataIndex: 'wxid',
-    width: 100,
-  },
-  {
     title: t('wechat.whatsapp.account'),
     dataIndex: 'account',
     width: 100,
@@ -64,29 +59,9 @@ export const columns: BasicColumn[] = [
     width: 100,
   },
   {
-    title: t('wechat.whatsapp.allowList'),
-    dataIndex: 'allowList',
-    width: 100,
-  },
-  {
-    title: t('wechat.whatsapp.groupAllowList'),
-    dataIndex: 'groupAllowList',
-    width: 100,
-  },
-  {
-    title: t('wechat.whatsapp.blockList'),
-    dataIndex: 'blockList',
-    width: 100,
-  },
-  {
-    title: t('wechat.whatsapp.groupBlockList'),
-    dataIndex: 'groupBlockList',
-    width: 100,
-  },
-  {
     title: t('common.status'),
     dataIndex: 'status',
-    width: 50,
+    width: 80,
     customRender: ({ record }) => {
       if (!Reflect.has(record, 'pendingStatus')) {
         record.pendingStatus = false;
@@ -113,7 +88,7 @@ export const columns: BasicColumn[] = [
   {
     title: t('common.createTime'),
     dataIndex: 'createdAt',
-    width: 70,
+    width: 170,
     customRender: ({ record }) => {
       return formatToDateTime(record.createdAt);
     },
@@ -167,12 +142,6 @@ export const formSchema: FormSchema[] = [
     required: true,
   },
   {
-    field: 'wxid',
-    label: t('wechat.whatsapp.wxid'),
-    component: 'Input',
-    required: true,
-  },
-  {
     field: 'account',
     label: t('wechat.whatsapp.account'),
     component: 'Input',
@@ -215,30 +184,6 @@ export const formSchema: FormSchema[] = [
     required: true,
   },
   {
-    field: 'allowList',
-    label: t('wechat.whatsapp.allowList'),
-    component: 'Input',
-    required: true,
-  },
-  {
-    field: 'groupAllowList',
-    label: t('wechat.whatsapp.groupAllowList'),
-    component: 'Input',
-    required: true,
-  },
-  {
-    field: 'blockList',
-    label: t('wechat.whatsapp.blockList'),
-    component: 'Input',
-    required: true,
-  },
-  {
-    field: 'groupBlockList',
-    label: t('wechat.whatsapp.groupBlockList'),
-    component: 'Input',
-    required: true,
-  },
-  {
     field: 'status',
     label: t('wechat.whatsapp.status'),
     component: 'RadioButtonGroup',