Pārlūkot izejas kodu

feature: 修改message提示,权限

ljc 5 mēneši atpakaļ
vecāks
revīzija
c4ad878369
38 mainītis faili ar 919 papildinājumiem un 443 dzēšanām
  1. 104 91
      src/i18n/locales/cn.json
  2. 83 49
      src/lib/pigeon.js
  3. 0 1
      src/main.ts
  4. 8 0
      src/routers/modules/system.ts
  5. 24 0
      src/service/user.ts
  6. 52 0
      src/utils/utils.ts
  7. 4 5
      src/views/card/Card3DSTransaction/index.vue
  8. 15 15
      src/views/card/CardBlockchain/index.vue
  9. 13 13
      src/views/card/CardBlockchainRate/index.vue
  10. 4 5
      src/views/card/CardBlockchainTransaction/index.vue
  11. 12 13
      src/views/card/CardBusiness/index.vue
  12. 12 12
      src/views/card/CardConfig/index.vue
  13. 2 3
      src/views/card/CardDetail/index.vue
  14. 6 7
      src/views/card/CardGlobalCurrency/index.vue
  15. 4 4
      src/views/card/CardGlobalOrder/components/GlobalOrderBatchApprove.vue
  16. 12 17
      src/views/card/CardGlobalOrder/components/GlobalOrderDialog.vue
  17. 15 15
      src/views/card/CardGlobalOrder/index.vue
  18. 7 7
      src/views/card/CardIdTypeConfig/index.vue
  19. 6 6
      src/views/card/CardRecharge/components/add.vue
  20. 17 13
      src/views/card/CardRecharge/index.vue
  21. 8 9
      src/views/card/CardTransactions/index.vue
  22. 4 5
      src/views/card/CardUserOrder/index.vue
  23. 13 12
      src/views/card/CardUserRights/index.vue
  24. 3 4
      src/views/card/CardWithdrawTransaction/index.vue
  25. 4 5
      src/views/card/components/CardDetailRecharge/index.vue
  26. 4 5
      src/views/card/components/CardDetailTransactions/index.vue
  27. 4 5
      src/views/card/components/CardDetailWithdraw/index.vue
  28. 12 16
      src/views/components/PaymentTransfer/index.vue
  29. 23 11
      src/views/home2/Home.vue
  30. 10 2
      src/views/login/index.vue
  31. 13 12
      src/views/system/GoogleEmail/index.vue
  32. 7 7
      src/views/system/Refusal/components/Add.vue
  33. 10 9
      src/views/system/Refusal/index.vue
  34. 271 0
      src/views/system/ShopManage/index.vue
  35. 18 0
      src/views/user/userList/components/UserAdd.vue
  36. 25 24
      src/views/user/userList/index.vue
  37. 71 26
      src/views/user/userRole/components/RoleAdd/index.vue
  38. 19 15
      src/views/user/userRole/index.vue

+ 104 - 91
src/i18n/locales/cn.json

@@ -1,7 +1,7 @@
 {
   "Msg": {
-    "Withdrawal":"出金申请金额",
-    "Payment":"打款金额",
+    "Withdrawal": "出金申请金额",
+    "Payment": "打款金额",
     "DeleteConfirm": "是否删除",
     "SystemError": "系统错误,请稍后再试。",
     "LoginSuccess": "登录成功,马上进入系统。",
@@ -307,7 +307,7 @@
     "Female": "女",
     "NoSuccess": "未成功"
   },
-  "R-Cooperation":"合作模式",
+  "R-Cooperation": "合作模式",
   "R-Cooperation-Search": "列表",
   "R-Cooperation-Detailed": "详情",
   "R-Cooperation-Update": "编辑",
@@ -321,10 +321,10 @@
   "R-System-actSpread-Editor": "编辑",
   "R-System-actSpread-Delete": "删除",
   "R-System-amountDate": "账户免息配置",
-  "R-System-amountDate-Search":"列表",
-  "R-System-amountDate-Add":"新增",
-  "R-System-amountDate-Editor":"编辑",
-  "R-System-amountDate-Delete":"删除",
+  "R-System-amountDate-Search": "列表",
+  "R-System-amountDate-Add": "新增",
+  "R-System-amountDate-Editor": "编辑",
+  "R-System-amountDate-Delete": "删除",
   "R-System-amountDate-TradingAccount": "交易账号",
   "R-System-amountDate-Platform": "平台",
   "R-System-amountDate-DayNumber": "免息天数",
@@ -335,23 +335,23 @@
   "R-System-amountDate-InputDayNumber": "请输入免息天数",
   "R-System-amountDate-DeleteConfirm": "确定要删除该条记录吗?",
   "R-System-amountDate-DeleteTitle": "删除确认",
-  "R-AmountFree-Search":"列表",
-  "R-AmountFree-Add":"新增",
-  "R-AmountFree-Editor":"编辑",
-  "R-AmountFree-Delete":"删除",
-  "R-exclude-Search":"列表",
-  "R-exclude-Add":"新增",
-  "R-exclude-Editor":"编辑",
-  "R-exclude-Delete":"删除",
-    "No":"第",
-  "Week":"周",
-  "R-dataRetrieval-Search":"列表",
-  "R-Bank-NoCertified":"未认证",
-  "R-Bank-ToCertified":"立即认证",
-  "R-dataRetrieval-Unseal":"解封",
-  "R-Bank-edit":"操作权限",
+  "R-AmountFree-Search": "列表",
+  "R-AmountFree-Add": "新增",
+  "R-AmountFree-Editor": "编辑",
+  "R-AmountFree-Delete": "删除",
+  "R-exclude-Search": "列表",
+  "R-exclude-Add": "新增",
+  "R-exclude-Editor": "编辑",
+  "R-exclude-Delete": "删除",
+  "No": "第",
+  "Week": "周",
+  "R-dataRetrieval-Search": "列表",
+  "R-Bank-NoCertified": "未认证",
+  "R-Bank-ToCertified": "立即认证",
+  "R-dataRetrieval-Unseal": "解封",
+  "R-Bank-edit": "操作权限",
   "R-Enter": "菜单",
-  "R-Real-Amount":"全部金额",
+  "R-Real-Amount": "全部金额",
   "R-Real-Disabled": "开户设置查看",
   "R-Dashboard": "控制台",
   "R-CustomerDynamic": "客户动态",
@@ -411,12 +411,12 @@
   "R-VerifiedUser": "待核验用户",
   "R-LimitedActivities": "限时活动",
   "R-Rebate": "活动返利",
-  "R-MonthlyList":"月赏礼遇活动",
+  "R-MonthlyList": "月赏礼遇活动",
   "R-UtaskList": "U币入金奖励活动",
   "R-surplusList": "月盈赠金活动",
   "R-surplusList-Search": "列表",
   "R-surplusList-Complete": "完成任务",
-  "R-surplusList-Cancel": "取消任务", 
+  "R-surplusList-Cancel": "取消任务",
   "R-surplusList-Recover": "恢复信用",
   "R-UtaskList-Search": "列表",
   "R-PendingAccount": "待审批账户",
@@ -595,15 +595,15 @@
   "R-Trading-AdjustmentAttribution": "调整归属",
   "R-Trading-Rematch": "重新匹配",
   "R-Trading-Export": "导出",
-  "R-EmailRecords-Export":"导出",
-  "R-Business-Export":"导出",
-  "R-KycAuth-Export":"导出",
-  "R-CardOrder-Export":"导出",
-  "R-VirtualCard-Export":"导出",
-  "R-Recharge-Export":"导出",
-  "R-Transactions-Export":"导出",
-  "R-UserOrder-Export":"导出",
-  "R-CardOperate-Export":"导出",
+  "R-EmailRecords-Export": "导出",
+  "R-Business-Export": "导出",
+  "R-KycAuth-Export": "导出",
+  "R-CardOrder-Export": "导出",
+  "R-VirtualCard-Export": "导出",
+  "R-Recharge-Export": "导出",
+  "R-Transactions-Export": "导出",
+  "R-UserOrder-Export": "导出",
+  "R-CardOperate-Export": "导出",
   "R-Trading-dayLimit": "每日出金限额",
   "R-Agent-Search": "列表",
   "R-Agent-Single": "详情",
@@ -665,7 +665,8 @@
   "R-Agent-AdjustmentAttribution": "调整归属",
   "R-Agent-pammManagerValid": "PAMM申请",
   "R-Agent-PAMMValid": "Money Manager申请",
-  "R-Agent-Transfer": "代理内转",  "R-Agent-CloseFunction": "关闭功能",
+  "R-Agent-Transfer": "代理内转",
+  "R-Agent-CloseFunction": "关闭功能",
   "R-Agent-Level": "查询下级",
   "R-Agent-black": "固定加点",
   "R-Agent-Export": "导出",
@@ -693,11 +694,11 @@
   "R-EmailRecords": "邮件记录",
   "R-EmailRecords-Search": "列表",
   "R-Reward-Details": "销售奖励详情",
-  "R-Review":"审核kyc",
-  "R-DeleteList":"账户删除记录",
-  "R-DeleteList-Search":"列表",
-  "R-Attribution":"修改归属记录",
-  "R-Attribution-Search":"列表",
+  "R-Review": "审核kyc",
+  "R-DeleteList": "账户删除记录",
+  "R-DeleteList-Search": "列表",
+  "R-Attribution": "修改归属记录",
+  "R-Attribution-Search": "列表",
   "R-AccountRetrieval-Search": "列表",
   "R-UserRetrieval": "用户检索",
   "R-UserRetrieval-Search": "列表",
@@ -886,7 +887,7 @@
   "R-Exclude-Delete": "删除",
   "R-Exclude-Update": "修改",
   "R-Exclude-Add": "新增",
-  "R-GoogleEmail":"Gmail管理",
+  "R-GoogleEmail": "Gmail管理",
   "R-GoogleEmail-Search": "列表",
   "R-GoogleEmail-Add": "新增",
   "R-GoogleEmail-Update": "修改",
@@ -1289,6 +1290,11 @@
   "R-ActivitiesApply23New-Delete": "删除",
   "R-ActivitiesApply23New-Export": "导出",
   "R-exclude": "活动排除账号",
+  "R-ShopManage": "商户管理",
+  "R-ShopManage-Page": "列表",
+  "R-ShopManage-Add": "新增",
+  "R-ShopManage-Edit": "编辑",
+  "R-ShopManage-Del": "删除",
   "ActivitiesApply23New": {
     "item1": "申请状态",
     "item2": "转换状态",
@@ -1964,24 +1970,24 @@
       "ToBeProcessed": "待处理数",
       "Deposit": "存款申请",
       "TWithdraw": "取款申请",
-    "Commission": "佣金提取"
-  },
-  "Commission": {
-    "CId": "客户ID",
-    "PIbNo": "归属编号",
-    "WithdrawIbNo": "代理账户",
-    "Name": "姓名",
-    "WithdrawAmount": "转出金额",
-    "WithdrawCurrency": "货币",
-    "DepositIbNo": "转入账户",
-    "DepositAmount": "转入金额",
-    "DepositCurrency": "货币",
-    "AddTime": "申请时间",
-    "Status": "状态",
-    "Status-Processing": "处理中",
-    "Status-Approved": "已通过",
-    "Status-Rejected": "已拒绝"
-  },
+      "Commission": "佣金提取"
+    },
+    "Commission": {
+      "CId": "客户ID",
+      "PIbNo": "归属编号",
+      "WithdrawIbNo": "代理账户",
+      "Name": "姓名",
+      "WithdrawAmount": "转出金额",
+      "WithdrawCurrency": "货币",
+      "DepositIbNo": "转入账户",
+      "DepositAmount": "转入金额",
+      "DepositCurrency": "货币",
+      "AddTime": "申请时间",
+      "Status": "状态",
+      "Status-Processing": "处理中",
+      "Status-Approved": "已通过",
+      "Status-Rejected": "已拒绝"
+    },
     "Role": {
       "item0": "超级管理员",
       "item1": "客服",
@@ -2516,15 +2522,15 @@
       "CUSTOM_KYC_SUCCESS_EN": "人脸认证审核通过(英)",
       "CUSTOM_KYC_FAIL_CN": "人脸认证审核失败(中)",
       "CUSTOM_KYC_FAIL_EN": "人脸认证审核失败(英)",
-      "CUSTOM_KYC_APPROVE":"人脸认证审核通知",
-      "AGENT_CUSTOM_ACTIVITY_REQUITE_SUCCESS_CN":"一级代理用户限时回馈活动结束通知(中)",
-      "AGENT_CUSTOM_ACTIVITY_REQUITE_SUCCESS_EN":"一级代理用户限时回馈活动结束通知(英)",
-      "CUSTOM_ACTIVITY_UCOIN_CN":"客户参加U币入金奖励活动通知",
-      "CUSTOM_ACTIVITY_UCOIN_EN":"客户参加U币入金奖励活动通知(英)",
-      "CUSTOM_ACTIVITY_UCOIN_END_CN":"客户参加U币入金奖励活动结束通知",
-      "CUSTOM_ACTIVITY_UCOIN_END_EN":"客户参加U币入金奖励活动结束通知(英)",
-      "IB_CUSTOM_ACTIVITY_UCOIN_CN":"代理用户参加U币入金奖励活动通知",
-      "IB_CUSTOM_ACTIVITY_UCOIN_EN":"代理用户参加U币入金奖励活动通知(英)",
+      "CUSTOM_KYC_APPROVE": "人脸认证审核通知",
+      "AGENT_CUSTOM_ACTIVITY_REQUITE_SUCCESS_CN": "一级代理用户限时回馈活动结束通知(中)",
+      "AGENT_CUSTOM_ACTIVITY_REQUITE_SUCCESS_EN": "一级代理用户限时回馈活动结束通知(英)",
+      "CUSTOM_ACTIVITY_UCOIN_CN": "客户参加U币入金奖励活动通知",
+      "CUSTOM_ACTIVITY_UCOIN_EN": "客户参加U币入金奖励活动通知(英)",
+      "CUSTOM_ACTIVITY_UCOIN_END_CN": "客户参加U币入金奖励活动结束通知",
+      "CUSTOM_ACTIVITY_UCOIN_END_EN": "客户参加U币入金奖励活动结束通知(英)",
+      "IB_CUSTOM_ACTIVITY_UCOIN_CN": "代理用户参加U币入金奖励活动通知",
+      "IB_CUSTOM_ACTIVITY_UCOIN_EN": "代理用户参加U币入金奖励活动通知(英)",
       "Lang": "语言",
       "TemplateName": "模板名称",
       "EmailTitle": "邮件标题",
@@ -2741,6 +2747,7 @@
     "ToLogin": "拷贝账户",
     "CopyOrder": "拷贝订单号",
     "IpLimit": "是否IP限制",
+    "Merchant": "管理员",
     "limitIp": "限制IP",
     "excludeCIds": "排除CID",
     "PAMMfee": "PAMM手续费",
@@ -2954,7 +2961,7 @@
     "totalProfit": "平仓总盈亏",
     "tradeCount": "订单数",
     "cptIdSelect": "请先选择比赛",
-    "SerialNumber": "流水号",  
+    "SerialNumber": "流水号",
     "Time": "时间",
     "modifyTime": "编辑时间",
     "Floating": "浮动盈亏",
@@ -2972,6 +2979,7 @@
     "IntoAccount": "转入账户",
     "UserID": "用户ID",
     "RoleName": "角色名",
+    "ShopName": "商户名称",
     "RoleGroup": "角色组",
     "CreationDate": "创建日期",
     "LoginState": "登录状态",
@@ -3166,7 +3174,7 @@
     "SwapLong": "买入隔夜利息",
     "SwapShort": "卖出隔夜利息",
     "NetDepositAmount": "净入金金额",
-   
+
     "WithdrawAmount": "出金金额",
     "AgentWithdrawAmount": "佣金提取金额",
     "AddCustomNum": "注册人数",
@@ -3827,7 +3835,7 @@
     "R-PerformanceList-com": "交易量佣金明细",
     "R-PerformanceList-comD": "交易量佣金导出",
     "R-Performance-Record": "薪资收支记录",
-    "R-Sales-Dynamic":"销售动态绩效",
+    "R-Sales-Dynamic": "销售动态绩效",
     "Dynamic-basicSalary": "基本工资",
     "Dynamic-salaryPerformance": "薪资绩效列表",
     "Dynamic-basicPerformance": "底薪绩效列表",
@@ -3893,10 +3901,10 @@
       "item48": "团队",
       "item49": "工资货币类型",
       "item50": "备注",
-      "item51":"基本工资",
-      "item52":"实发工资",
-      "item53":"月份",
-      "item54":"活动奖励"
+      "item51": "基本工资",
+      "item52": "实发工资",
+      "item53": "月份",
+      "item54": "活动奖励"
     },
     "R-SalaryAccount": "薪资账户",
     "R-SalaryAccount-list": "列表",
@@ -4574,7 +4582,7 @@
       "deduction4": "退款处理中",
       "deduction5": "退款成功",
       "deduction6": "退款失败",
-      "currencyTip":"预计转换后为",
+      "currencyTip": "预计转换后为",
       "CancelOrder": "取消订单",
       "ConfirmCancelOrder": "确定要取消订单吗?",
       "CancelOrderSuccess": "取消成功",
@@ -5057,18 +5065,18 @@
       "tab3": "扣款记录"
     },
     "CardFile": {
-      "p1":"步骤列表",
-      "p2":"步骤",
-      "p3":"流程描述",
-      "p4":"请输入图片地址",
-      "p5":"请上传图片",
-      "p6":"视频列表",
-      "p7":"视频",
-      "p8":"请输入视频地址",
-      "p9":"请上传视频",
-      "p10":"PDF",
-      "p11":"PDF 密码",
-      "p12":"请上传PDF"
+      "p1": "步骤列表",
+      "p2": "步骤",
+      "p3": "流程描述",
+      "p4": "请输入图片地址",
+      "p5": "请上传图片",
+      "p6": "视频列表",
+      "p7": "视频",
+      "p8": "请输入视频地址",
+      "p9": "请上传视频",
+      "p10": "PDF",
+      "p11": "PDF 密码",
+      "p12": "请上传PDF"
     }
   },
   "global": {
@@ -7323,9 +7331,9 @@
     "GivePhone": "联系电话",
     "GiftDetail": "申请礼物详情"
   },
-  "Statistical":"统计入金金额",
-  "StatisticalWithdraw":"统计出金金额",
-  "NoData":"暂无数据",
+  "Statistical": "统计入金金额",
+  "StatisticalWithdraw": "统计出金金额",
+  "NoData": "暂无数据",
   "PersonalManagement": {
     "Bank": "银行信息",
     "Title": {
@@ -7425,5 +7433,10 @@
     "CopyProfitWithdrawal": "跟单分润出金",
     "CreditRevoke": "信用撤销",
     "ActivityBonus": "活动赠金"
+  },
+  "ShopManage": {
+    "add": "新增商户",
+    "edit": "编辑商户",
+    "t1": "商户名称"
   }
 }

+ 83 - 49
src/lib/pigeon.js

@@ -4,12 +4,15 @@
  * @Date: 2018-11-26 11:06:55
  * @LastEditTime: 2018-11-30 11:25:43
  */
+import { ElMessage, ElMessageBox } from 'element-plus'
+const base = {
+  placement: 'top-right',
+}
 
-class Pigeon {
+export default class Pigeon {
   constructor(vue) {
     this.vue = vue
   }
-
   /**
    * 系统提醒
    * @param {string} msg 提醒信息
@@ -17,27 +20,27 @@ class Pigeon {
    */
   message(msg, type = 0) {
     if (msg == '' || msg == null) {
-      this.vue.$message.error('msg不能为空!!!')
+      ElMessage.error('msg不能为空!!!')
       return false
     }
     switch (type) {
       case 0:
-        this.vue.$message({ customClass: 'crm_message crm_msg_info', message: msg })
+        ElMessage({ customClass: 'crm_message crm_msg_info', message: msg })
         break
       case 1:
-        this.vue.$message.success({ customClass: 'crm_message crm_msg_suc', message: msg })
+        ElMessage.success({ customClass: 'crm_message crm_msg_suc', message: msg })
         break
       case 2:
-        this.vue.$message.warning({
+        ElMessage.warning({
           customClass: 'crm_message crm_msg_war',
           message: msg,
         })
         break
       case 3:
-        this.vue.$message.error({ customClass: 'crm_message crm_msg_err', message: msg })
+        ElMessage.error({ customClass: 'crm_message crm_msg_err', message: msg })
         break
       default:
-        this.vue.$message({ customClass: 'crm_message crm_msg_info', message: msg })
+        ElMessage({ customClass: 'crm_message crm_msg_info', message: msg })
         break
     }
   }
@@ -49,6 +52,13 @@ class Pigeon {
   MessageOK(msg) {
     this.message(msg, 1)
   }
+  /**
+   * 成功的系统提醒
+   * @param {string} msg
+   */
+  success(msg) {
+    this.message(msg, 1)
+  }
 
   /**
    * 错误的系统提醒
@@ -58,6 +68,14 @@ class Pigeon {
     this.message(msg, 3)
   }
 
+  /**
+   * 错误的系统提醒
+   * @param {string} msg
+   */
+  error(msg) {
+    this.message(msg, 3)
+  }
+
   /**
    * 警告的系统提醒
    * @param {string} msg
@@ -66,6 +84,14 @@ class Pigeon {
     this.message(msg, 2)
   }
 
+  /**
+   * 警告的系统提醒
+   * @param {string} msg
+   */
+  warning(msg) {
+    this.message(msg, 2)
+  }
+
   /**
    * 普通的系统提醒
    * @param {string} msg
@@ -73,6 +99,13 @@ class Pigeon {
   MessageInfo(msg) {
     this.message(msg, 0)
   }
+  /**
+   * 普通的系统提醒
+   * @param {string} msg
+   */
+  info(msg) {
+    this.message(msg, 0)
+  }
 
   /**
    * 确认消息
@@ -81,17 +114,24 @@ class Pigeon {
    * @param {function} confirmHandle 确认回调函数
    * @param {function} cancelHandle 取消回调函数
    * @param {string} confirmText 确认按钮文字
-   * @param {string} cancalText 取消按钮文字
+   * @param {string} cancelText 取消按钮文字
    * @param {string} settings 其他配置项
    */
-  MessageConfirm(msg, title, confirmText, cancalText, confirmHandle, cancelHandle, settings = {}) {
-    this.vue
-      .$confirm(msg, title, {
-        confirmButtonText: confirmText,
-        cancelButtonText: cancalText,
-        customClass: 'crm_message_box',
-        ...settings,
-      })
+  static MessageConfirm(
+    msg,
+    title,
+    confirmText,
+    cancelText,
+    confirmHandle,
+    cancelHandle,
+    settings = {}
+  ) {
+    ElMessageBox.confirm(msg, title, {
+      confirmButtonText: confirmText,
+      cancelButtonText: cancelText,
+      customClass: 'crm_message_box',
+      ...settings,
+    })
       .then(({ value }) => {
         confirmHandle(value)
       })
@@ -105,12 +145,9 @@ class Pigeon {
    * @param {string} msg 提示信息
    * @param {function} confirmHandle 确认回调函数
    * @param {function} cancelHandle 取消回调函数
-   * @param {string} confirmText 确认按钮文字
-   * @param {string} cancalText 取消按钮文字
-   * @param {string} pattern 提交内容正则
-   * @param {string} errorMsg 提交内容错误提醒
+   * @param settings
    */
-  MessagePrompt(
+  static MessagePrompt(
     msg,
     confirmHandle,
     cancelHandle,
@@ -120,33 +157,32 @@ class Pigeon {
       inputErrorMessage: null,
     }
   ) {
-    this.vue
-      .$prompt(msg, '系统提示', {
-        confirmButtonText: settings.confirmButtonText || '确定',
-        cancelButtonText: settings.cancelButtonText || '取消',
-        ...settings,
-        beforeClose: (action, instance, done) => {
-          if (action === 'confirm') {
-            instance.confirmButtonLoading = true
-            instance.confirmButtonText = '执行中...'
+    ElMessageBox.prompt(msg, '系统提示', {
+      confirmButtonText: settings.confirmButtonText || '确定',
+      cancelButtonText: settings.cancelButtonText || '取消',
+      ...settings,
+      beforeClose: (action, instance, done) => {
+        if (action === 'confirm') {
+          instance.confirmButtonLoading = true
+          instance.confirmButtonText = '执行中...'
+          setTimeout(() => {
+            done()
             setTimeout(() => {
-              done()
-              setTimeout(() => {
-                instance.confirmButtonLoading = false
-              }, 100)
-            }, 500)
-          } else {
-            instance.cancelButtonLoading = true
-            instance.cancelButtonText = '执行中...'
+              instance.confirmButtonLoading = false
+            }, 100)
+          }, 500)
+        } else {
+          instance.cancelButtonLoading = true
+          instance.cancelButtonText = '执行中...'
+          setTimeout(() => {
+            done()
             setTimeout(() => {
-              done()
-              setTimeout(() => {
-                instance.cancelButtonLoading = false
-              }, 100)
-            }, 500)
-          }
-        },
-      })
+              instance.cancelButtonLoading = false
+            }, 100)
+          }, 500)
+        }
+      },
+    })
       .then(({ value }) => {
         confirmHandle(value)
       })
@@ -155,5 +191,3 @@ class Pigeon {
       })
   }
 }
-
-export default Pigeon

+ 0 - 1
src/main.ts

@@ -39,7 +39,6 @@ registerElIcons(app)
 
 app.mixin(mixins)
 app.component('SvgIcon', SvgIcon)
-
 app.use(vuex)
 app.use(pinia)
 app.use(router)

+ 8 - 0
src/routers/modules/system.ts

@@ -22,6 +22,14 @@ const systemRoute = {
       name: 'R-Refusal',
       component: () => import('@/views/system/Refusal/index.vue'),
     },
+    {
+      meta: {
+        OnBreadCrumb: true,
+      },
+      path: 'shopManage',
+      name: 'R-ShopManage',
+      component: () => import('@/views/system/ShopManage/index.vue'),
+    },
   ],
 }
 

+ 24 - 0
src/service/user.ts

@@ -139,6 +139,30 @@ class UserService extends Service {
   async userSales(params = {}) {
     return await this.post('/user/sales', params)
   }
+  // 商户管理 -列表
+  async getShopManage(params = {}) {
+    return await this.post('/merchant/search/list', params)
+  }
+  // 商户管理 -add
+  async shopManageAdd(params = {}) {
+    return await this.post('/merchant/add', params)
+  }
+  // 商户管理 -edit
+  async shopManageEdit(params = {}) {
+    return await this.post('/merchant/edit', params)
+  }
+  // 商户管理 -add
+  async shopManageDel(params = {}) {
+    return await this.post('/merchant/delete', params)
+  }
+  // 商户管理 -list
+  // async getShopManageList(params = {}) {
+  //   return await this.get('/merchant/findSingle', params)
+  // }
+  // 商户管理 -list
+  async getShopManageList(params = {}) {
+    return await this.post('/merchant/getAllMerchant', params)
+  }
 }
 
 export default new UserService()

+ 52 - 0
src/utils/utils.ts

@@ -23,3 +23,55 @@ export function copyText(text = '') {
     document.body.removeChild(textarea)
   }
 }
+
+/**
+ * 递归过滤出所有 show 为 true 的节点,包括按钮
+ * @param {Object} node - 菜单节点
+ * @returns {Object|null} 过滤后的节点
+ */
+export function filterByShowTrue(node) {
+  // 如果节点自身不显示,直接返回 null
+  if (!node.show) {
+    return null
+  }
+
+  // 创建结果对象的浅拷贝
+  const result = { ...node }
+
+  // 递归处理子节点
+  if (result.children && Array.isArray(result.children)) {
+    const filteredChildren = result.children
+      .map((child) => filterByShowTrue(child))
+      .filter((child) => child !== null)
+
+    if (filteredChildren.length > 0) {
+      result.children = filteredChildren
+    } else {
+      // 如果没有可见的子节点,删除 children 属性
+      delete result.children
+    }
+  }
+
+  // 过滤按钮
+  if (result.btns && typeof result.btns === 'object') {
+    const filteredBtns = {}
+    let hasVisibleBtns = false
+
+    Object.entries(result.btns).forEach(([key, btn]) => {
+      // 只保留 show 为 true 的按钮
+      if (btn.show === true) {
+        filteredBtns[key] = { ...btn }
+        hasVisibleBtns = true
+      }
+    })
+
+    if (hasVisibleBtns) {
+      result.btns = filteredBtns
+    } else {
+      // 如果没有可见的按钮,删除 btns 属性
+      delete result.btns
+    }
+  }
+
+  return result
+}

+ 4 - 5
src/views/card/Card3DSTransaction/index.vue

@@ -180,7 +180,6 @@
   import { ref, reactive, computed, onMounted, watch, inject } from 'vue'
   import { useI18n } from 'vue-i18n'
   import { useRouter } from 'vue-router'
-  import { ElMessage } from 'element-plus'
   import { Search } from '@element-plus/icons-vue'
   import Service from '@/service/ucard'
   import Config from '@/config/index'
@@ -231,7 +230,7 @@
         'Card_3DS_Transactions'
       )
     } catch (error) {
-      ElMessage.error(t('Msg.ExportFail'))
+      pigeon.error(t('Msg.ExportFail'))
     }
   }
 
@@ -249,7 +248,7 @@
   const searchFunc = async () => {
     pictLoading.value = true
     if (!display.value['R-Card-3DSTransaction-Page']?.show) {
-      ElMessage.warning(t('Msg.NotDisplay'))
+      pigeon.warning(t('Msg.NotDisplay'))
       pictLoading.value = false
       return
     }
@@ -271,9 +270,9 @@
         pagerInfo.rowTotal = 0
       }
 
-      ElMessage.success(t('Msg.SearchSuccess'))
+      pigeon.success(t('Msg.SearchSuccess'))
     } else {
-      ElMessage.error(res.msg)
+      pigeon.error(res.msg)
     }
     pictLoading.value = false
   }

+ 15 - 15
src/views/card/CardBlockchain/index.vue

@@ -254,7 +254,7 @@
 <script setup>
   import { ref, reactive, computed, onMounted, inject } from 'vue'
   import { useI18n } from 'vue-i18n'
-  import { ElMessage, ElMessageBox } from 'element-plus'
+  import { ElMessageBox } from 'element-plus'
   import Service from '@/service/ucard'
   import Config from '@/config/index'
   import { enableStatus } from '@/enum/enum'
@@ -342,7 +342,7 @@
   const searchFunc = async () => {
     pictLoading.value = true
     if (!display.value['R-Card-Blockchain-Page']?.show) {
-      ElMessage.warning(t('Msg.NotDisplay'))
+      pigeon.warning(t('Msg.NotDisplay'))
       pictLoading.value = false
       return
     }
@@ -373,9 +373,9 @@
         pagerInfo.rowTotal = 0
       }
 
-      ElMessage.success(t('Msg.SearchSuccess'))
+      pigeon.success(t('Msg.SearchSuccess'))
     } else {
-      ElMessage.error(res.msg)
+      pigeon.error(res.msg)
     }
 
     pictLoading.value = false
@@ -406,7 +406,7 @@
     if (res.code == Code.StatusOK) {
       opts.value = res.data
     } else {
-      ElMessage.error(res.msg)
+      pigeon.error(res.msg)
     }
   }
 
@@ -415,7 +415,7 @@
     if (res.code == Code.StatusOK) {
       userList.value = res.data
     } else {
-      ElMessage.error(res.msg)
+      pigeon.error(res.msg)
     }
   }
 
@@ -465,13 +465,13 @@
       })
 
       if (res.code == 200) {
-        ElMessage.success(t('card.Info.t27'))
+        pigeon.success(t('card.Info.t27'))
         searchFunc()
       } else {
-        ElMessage.error(res.msg)
+        pigeon.error(res.msg)
       }
     } catch (error) {
-      ElMessage.error(t('Msg.SystemError'))
+      pigeon.error(t('Msg.SystemError'))
     }
   }
 
@@ -498,14 +498,14 @@
         : await Service.addBlockchain(params)
 
       if (res.code == Code.StatusOK) {
-        ElMessage.success(t('Msg.SaveSuccess'))
+        pigeon.success(t('Msg.SaveSuccess'))
         addDialogVisible.value = false
         searchFunc() // 刷新列表
       } else {
-        ElMessage.error(res.msg)
+        pigeon.error(res.msg)
       }
     } catch (error) {
-      ElMessage.error(t('Msg.SaveFail'))
+      pigeon.error(t('Msg.SaveFail'))
     } finally {
       addLoading.value = false
     }
@@ -526,14 +526,14 @@
 
       const res = await Service.deleteBlockchain({ ids })
       if (res.code == Code.StatusOK) {
-        ElMessage.success(t('Msg.DeleteSuccess'))
+        pigeon.success(t('Msg.DeleteSuccess'))
         searchFunc() // 刷新列表
       } else {
-        ElMessage.error(res.msg)
+        pigeon.error(res.msg)
       }
     } catch (error) {
       if (error !== 'cancel') {
-        ElMessage.error(t('Msg.DeleteFail'))
+        pigeon.error(t('Msg.DeleteFail'))
       }
     }
   }

+ 13 - 13
src/views/card/CardBlockchainRate/index.vue

@@ -216,7 +216,7 @@
 <script setup>
   import { ref, reactive, computed, watch, onMounted, nextTick, inject } from 'vue'
   import { useI18n } from 'vue-i18n'
-  import { ElMessage, ElMessageBox } from 'element-plus'
+  import { ElMessageBox } from 'element-plus'
   import Service from '@/service/ucard'
   import Config from '@/config/index'
   import { enableStatus } from '@/enum/enum'
@@ -334,7 +334,7 @@
   const searchFunc = async () => {
     pictLoading.value = true
     if (!display.value['R-Card-BlockchainRate-Page']?.show) {
-      ElMessage.warning(t('Msg.NotDisplay'))
+      pigeon.warning(t('Msg.NotDisplay'))
       pictLoading.value = false
       return
     }
@@ -355,9 +355,9 @@
       } else {
         pagerInfo.rowTotal = 0
       }
-      ElMessage.success(t('Msg.SearchSuccess'))
+      pigeon.success(t('Msg.SearchSuccess'))
     } else {
-      ElMessage.error(res.msg)
+      pigeon.error(res.msg)
     }
     pictLoading.value = false
   }
@@ -431,13 +431,13 @@
       })
 
       if (res.code == 200) {
-        ElMessage.success(t('card.Info.t27'))
+        pigeon.success(t('card.Info.t27'))
         searchFunc()
       } else {
-        ElMessage.error(res.msg)
+        pigeon.error(res.msg)
       }
     } catch (error) {
-      ElMessage.error(t('Msg.SystemError'))
+      pigeon.error(t('Msg.SystemError'))
     }
   }
 
@@ -456,14 +456,14 @@
         : await Service.addBlockchainRate(params)
 
       if (res.code == Code.StatusOK) {
-        ElMessage.success(t('Msg.SaveSuccess'))
+        pigeon.success(t('Msg.SaveSuccess'))
         addDialogVisible.value = false
         searchFunc() // 刷新列表
       } else {
-        ElMessage.error(res.msg)
+        pigeon.error(res.msg)
       }
     } catch (error) {
-      ElMessage.error(t('Msg.SaveFail'))
+      pigeon.error(t('Msg.SaveFail'))
     } finally {
       addLoading.value = false
     }
@@ -484,14 +484,14 @@
 
       const res = await Service.deleteBlockchainRate({ ids })
       if (res.code == Code.StatusOK) {
-        ElMessage.success(t('Msg.DeleteSuccess'))
+        pigeon.success(t('Msg.DeleteSuccess'))
         searchFunc() // 刷新列表
       } else {
-        ElMessage.error(res.msg)
+        pigeon.error(res.msg)
       }
     } catch (error) {
       if (error !== 'cancel') {
-        ElMessage.error(t('Msg.DeleteFail'))
+        pigeon.error(t('Msg.DeleteFail'))
       }
     }
   }

+ 4 - 5
src/views/card/CardBlockchainTransaction/index.vue

@@ -153,7 +153,6 @@
 <script setup>
   import { ref, reactive, computed, onMounted, inject } from 'vue'
   import { useI18n } from 'vue-i18n'
-  import { ElMessage } from 'element-plus'
   import Service from '@/service/ucard'
   import Config from '@/config/index'
   import { exportExcel } from '@/utils/export'
@@ -207,7 +206,7 @@
   const searchFunc = async () => {
     pictLoading.value = true
     if (!display.value['R-Card-BlockchainTransaction-Page']?.show) {
-      ElMessage.warning(t('Msg.NotDisplay'))
+      pigeon.warning(t('Msg.NotDisplay'))
       pictLoading.value = false
       return
     }
@@ -228,9 +227,9 @@
       } else {
         pagerInfo.rowTotal = 0
       }
-      ElMessage.success(t('Msg.SearchSuccess'))
+      pigeon.success(t('Msg.SearchSuccess'))
     } else {
-      ElMessage.error(res.msg)
+      pigeon.error(res.msg)
     }
     pictLoading.value = false
   }
@@ -263,7 +262,7 @@
         'Encrypted_Wallet_Transactions'
       )
     } catch (error) {
-      ElMessage.error(t('Msg.ExportFail'))
+      pigeon.error(t('Msg.ExportFail'))
     } finally {
       exportLoading.value = false
     }

+ 12 - 13
src/views/card/CardBusiness/index.vue

@@ -602,7 +602,6 @@
 <script lang="ts" setup>
   import { ref, reactive, computed, onMounted, watch, inject } from 'vue'
   import { useRouter } from 'vue-router'
-  import { ElMessage as Message } from 'element-plus'
   import Config from '@/config/index'
   import TradingInfoAdd from '@/views/components/VirtualCard/index.vue'
   import ViewCardSingle from '@/views/components/ViewCardSingle/index.vue'
@@ -614,7 +613,7 @@
   import DetailedInfoCid from '@/views/components/DetailedInfoCid'
   import _ from 'lodash'
   import { exportExcel } from '@/utils/export'
-  import { EditPen, Operation, Plus, Search, View } from '@element-plus/icons-vue'
+  import { EditPen, Operation, Plus, Search, Setting, View } from '@element-plus/icons-vue'
   import { useI18n } from 'vue-i18n'
 
   const { Code } = Config
@@ -1152,7 +1151,7 @@
       pigeon.MessageOK(t('Msg.SearchSuccess'))
       toSearch()
     } else {
-      Message.error(res.msg)
+      pigeon.error(res.msg)
     }
   }
 
@@ -1232,7 +1231,7 @@
         if (res.code !== 200) {
           throw new Error(res.msg)
         }
-        Message.success(t('Ucard.Business.ms5'))
+        pigeon.success(t('Ucard.Business.ms5'))
       } else if (businessForm.uniqueId) {
         const res = await UcardService.merchantUpdate({
           ...businessForm,
@@ -1241,7 +1240,7 @@
         if (res.code !== 200) {
           throw new Error(res.msg)
         }
-        Message.success(t('Ucard.Business.ms7'))
+        pigeon.success(t('Ucard.Business.ms7'))
       } else {
         throw new Error(t('Ucard.Business.ms13'))
       }
@@ -1385,14 +1384,14 @@
       const res = await UcardService.ucardUpload(formData)
       if (res.code === 200 && res.data) {
         kycUploadForm.data = res.data
-        Message.success(t('Ucard.Business.ms11'))
+        pigeon.success(t('Ucard.Business.ms11'))
         option.onSuccess(res, option.file)
       } else {
-        Message.error(res.msg)
+        pigeon.error(res.msg)
         option.onError()
       }
     } catch (e) {
-      Message.error(t('Ucard.Business.ms12'))
+      pigeon.error(t('Ucard.Business.ms12'))
       option.onError()
     }
   }
@@ -1400,11 +1399,11 @@
   const submitKycUpload = async () => {
     const uniqueId = kycUploadUniqueId.value || businessForm.uniqueId
     if (!uniqueId) {
-      Message.error(t('Ucard.Business.ms13'))
+      pigeon.error(t('Ucard.Business.ms13'))
       return
     }
     if (!kycUploadForm.type || !kycUploadForm.data) {
-      Message.error(t('Ucard.Business.ms14'))
+      pigeon.error(t('Ucard.Business.ms14'))
       return
     }
     const params = {
@@ -1415,15 +1414,15 @@
     try {
       const res = await UcardService.kycUpload(params)
       if (res.code === 0) {
-        Message.success(res.msg)
+        pigeon.success(res.msg)
         kycUploadForm.type = ''
         kycUploadForm.data = ''
         dialogKycUpload.value = false
       } else {
-        Message.error(res.msg)
+        pigeon.error(res.msg)
       }
     } catch (e) {
-      Message.error(t('Ucard.Business.ms16'))
+      pigeon.error(t('Ucard.Business.ms16'))
     }
   }
 

+ 12 - 12
src/views/card/CardConfig/index.vue

@@ -225,7 +225,7 @@
 <script setup>
   import { ref, reactive, computed, onMounted, watch, inject, nextTick } from 'vue'
   import { useI18n } from 'vue-i18n'
-  import { ElMessage, ElMessageBox } from 'element-plus'
+  import { ElMessageBox } from 'element-plus'
   import { Search, MoreFilled, Operation, Edit, Delete } from '@element-plus/icons-vue'
   import PagePagination from '@/components/pagePagination'
   import Service from '@/service/ucard'
@@ -326,10 +326,10 @@
         ids: multipleSelection.value,
       })
       if (res.code == Code.StatusOK) {
-        ElMessage.success(t('Msg.DeleteSuccess'))
+        pigeon.success(t('Msg.DeleteSuccess'))
         searchFunc()
       } else {
-        ElMessage.error(res.msg)
+        pigeon.error(res.msg)
       }
     } catch (error) {
       // 用户取消删除
@@ -364,7 +364,7 @@
 
   const submitUpload = () => {
     if (!file.value) {
-      ElMessage.warning(t('Msg.upload'))
+      pigeon.warning(t('Msg.upload'))
       return
     }
     fileLoading.value = true
@@ -373,11 +373,11 @@
 
   const handleAvatarSuccess = (res) => {
     if (res.code == 200) {
-      ElMessage.success(t('Msg.uploadSuccess'))
+      pigeon.success(t('Msg.uploadSuccess'))
       Cancel()
       toSearch()
     } else {
-      ElMessage.error(res.msg)
+      pigeon.error(res.msg)
     }
     fileLoading.value = false
   }
@@ -409,7 +409,7 @@
     const isLt2M = file.size / 1024 / 1024 < 3
 
     if (!isLt2M) {
-      ElMessage.error(t('news_add_field.Des.item1'))
+      pigeon.error(t('news_add_field.Des.item1'))
     }
     return isLt2M
   }
@@ -438,7 +438,7 @@
     pictLoading.value = true
 
     if (!display.value['R-CardConfig-List']?.show) {
-      ElMessage.warning(t('Msg.NotDisplay'))
+      pigeon.warning(t('Msg.NotDisplay'))
       pictLoading.value = false
       return
     }
@@ -459,9 +459,9 @@
       } else {
         pagerInfo.rowTotal = 0
       }
-      ElMessage.success(t('Msg.SearchSuccess'))
+      pigeon.success(t('Msg.SearchSuccess'))
     } else {
-      ElMessage.error(res.msg)
+      pigeon.error(res.msg)
     }
     pictLoading.value = false
   }
@@ -490,11 +490,11 @@
         dialogCheck.value = false
         toSearch()
       } else {
-        ElMessage.error(res.msg)
+        pigeon.error(res.msg)
       }
     } catch (error) {
       console.log(error)
-      ElMessage.error(t('Msg.SystemError'))
+      pigeon.error(t('Msg.SystemError'))
     }
   }
 

+ 2 - 3
src/views/card/CardDetail/index.vue

@@ -218,7 +218,6 @@
   import { ref, reactive, computed, onMounted, inject, defineAsyncComponent } from 'vue'
   import { useI18n } from 'vue-i18n'
   import { useRoute } from 'vue-router'
-  import { ElMessage } from 'element-plus'
   import Service from '@/service/ucard'
   import Config from '@/config/index'
   import { copyText } from '@/utils/utils'
@@ -331,7 +330,7 @@
     if (res.code == Code.StatusOK) {
       cvvForm.cvv = res.data
     } else {
-      ElMessage.error(res.msg)
+      pigeon.error(res.msg)
     }
   }
 
@@ -346,7 +345,7 @@
   // 复制到剪切板
   const copy = (str) => {
     copyText(str)
-    ElMessage.success(t('Dashboard.Profile.CopySuccess'))
+    pigeon.success(t('Dashboard.Profile.CopySuccess'))
   }
 
   // 生命周期

+ 6 - 7
src/views/card/CardGlobalCurrency/index.vue

@@ -284,7 +284,6 @@
 <script setup>
   import { computed, inject, onMounted, reactive, ref, watch } from 'vue'
   import { useI18n } from 'vue-i18n'
-  import { ElMessage } from 'element-plus'
   import { multiply } from 'lodash-es'
   import Service from '@/service/ucard'
   import Config from '@/config/index'
@@ -580,7 +579,7 @@
       pigeon.MessageOK(t('Msg.SearchSuccess'))
       searchFunc()
     } else {
-      ElMessage.error(res.msg)
+      pigeon.error(res.msg)
     }
     syncLoading.value = false
   }
@@ -594,7 +593,7 @@
     if (res.code == Code.StatusOK) {
       currenciesDropdown.value = [...new Set(res.data.map((item) => item.payoutCurrency))]
     } else {
-      ElMessage.error(res.msg)
+      pigeon.error(res.msg)
     }
   }
 
@@ -603,7 +602,7 @@
     if (res.code == Code.StatusOK) {
       mergeFirstRowData.value = [res.data]
     } else {
-      ElMessage.error(res.msg)
+      pigeon.error(res.msg)
     }
   }
 
@@ -611,7 +610,7 @@
     pictLoading.value = true
 
     if (!display.value['R-GlobalCurrency-List'].show) {
-      ElMessage.warning(t('Msg.NotDisplay'))
+      pigeon.warning(t('Msg.NotDisplay'))
       pictLoading.value = false
       return
     }
@@ -632,9 +631,9 @@
       } else {
         pagerInfo.rowTotal = 0
       }
-      ElMessage.success(t('Msg.SearchSuccess'))
+      pigeon.success(t('Msg.SearchSuccess'))
     } else {
-      ElMessage.error(res.msg)
+      pigeon.error(res.msg)
     }
     pictLoading.value = false
   }

+ 4 - 4
src/views/card/CardGlobalOrder/components/GlobalOrderBatchApprove.vue

@@ -82,7 +82,7 @@
 <script setup>
   import { ref, reactive, computed, watch, inject, defineProps, defineEmits } from 'vue'
   import { useI18n } from 'vue-i18n'
-  import { ElMessage, ElMessageBox } from 'element-plus'
+  import { ElMessageBox } from 'element-plus'
   import CardService from '@/service/ucard'
   import Config from '@/config/index'
   import { safeGetUser } from '@/utils/safeJson.js'
@@ -172,11 +172,11 @@
       const res = await CardService.globalOrderApprove(params)
 
       if (res.code == Code.StatusOK) {
-        ElMessage.success(res.msg)
+        pigeon.success(res.msg)
         closeDia(true)
       } else {
         if (res.msg) {
-          ElMessage.error(res.msg)
+          pigeon.error(res.msg)
         } else if (res.data) {
           const data = res.data
           const list = Object.entries(data).map(([key, value]) => {
@@ -194,7 +194,7 @@
       }
     } catch (error) {
       console.error('批量审批失败:', error)
-      ElMessage.error(t('Msg.SystemError'))
+      pigeon.error(t('Msg.SystemError'))
     } finally {
       btnLoading.value = false
     }

+ 12 - 17
src/views/card/CardGlobalOrder/components/GlobalOrderDialog.vue

@@ -361,13 +361,7 @@
 <script setup>
   import { ref, reactive, computed, watch, onMounted, nextTick, inject } from 'vue'
   import { useI18n } from 'vue-i18n'
-  import { ElMessage, ElMessageBox } from 'element-plus'
-  import {
-    complianceStatusEnum,
-    payoutMethod,
-    transferType,
-    approvalText,
-  } from '@/enum/card/globalOrder'
+  import { complianceStatusEnum } from '@/enum/card/globalOrder'
   import Service from '@/service/financial'
   import CardService from '@/service/ucard'
   import Config from '@/config'
@@ -381,6 +375,7 @@
   const { t } = useI18n()
   const { Code, Host85 } = Config
   const Session = inject('session')
+  const pigeon = inject('pigeon')
 
   // 定义props
   const props = defineProps({
@@ -616,10 +611,10 @@
     })
 
     if (res.code == Code.StatusOK) {
-      ElMessage.success(res.msg)
+      pigeon.success(res.msg)
       closeDia(true)
     } else {
-      ElMessage.error(res.msg)
+      pigeon.error(res.msg)
     }
   }
 
@@ -663,10 +658,10 @@
     const res = await CardService.globalSupplementary(params)
 
     if (res.code == Code.StatusOK) {
-      ElMessage.success(res.msg)
+      pigeon.success(res.msg)
       closeDia(true)
     } else {
-      ElMessage.error(res.msg)
+      pigeon.error(res.msg)
     }
   }
 
@@ -678,7 +673,7 @@
     if (res.code == Code.StatusOK) {
       reasons.value = res.data || {}
     } else {
-      ElMessage.error(res.msg)
+      pigeon.error(res.msg)
     }
   }
 
@@ -725,12 +720,12 @@
       const res = await UcardService.ucardUpload(formData)
       if (res.code === 200 && res.data) {
         complianceForm[item.fieldName] = Host85 + res.data
-        ElMessage.success(t('Ucard.Business.ms11'))
+        pigeon.success(t('Ucard.Business.ms11'))
       } else {
-        ElMessage.error(res.msg)
+        pigeon.error(res.msg)
       }
     } catch (e) {
-      ElMessage.error(t('Ucard.Business.ms12'))
+      pigeon.error(t('Ucard.Business.ms12'))
     }
   }
 
@@ -739,10 +734,10 @@
     const isLt2M = isImageType.checkSize(file.size)
 
     if (!isJPG) {
-      ElMessage.error(t('Msg.JPG1'))
+      pigeon.error(t('Msg.JPG1'))
     }
     if (!isLt2M) {
-      ElMessage.error(t('Msg.3IMG'))
+      pigeon.error(t('Msg.3IMG'))
     }
     return isJPG && isLt2M
   }

+ 15 - 15
src/views/card/CardGlobalOrder/index.vue

@@ -508,7 +508,7 @@
 <script setup>
   import { ref, reactive, computed, watch, onMounted, nextTick, inject } from 'vue'
   import { useRouter } from 'vue-router'
-  import { ElMessage, ElMessageBox } from 'element-plus'
+  import { ElMessageBox } from 'element-plus'
   import { Search, View, EditPen, Close, Plus } from '@element-plus/icons-vue'
   import _ from 'lodash'
   import Config from '@/config/index'
@@ -762,7 +762,7 @@
     if (res.code === 200) {
       cardUserData.value = res.data
     } else {
-      ElMessage.error(res.msg)
+      pigeon.error(res.msg)
     }
   }
 
@@ -934,20 +934,20 @@
     const { usedQuota, yearTransferAmountQuota, minQuota, maxQuota } = exchangeRateData.value
 
     if (!/^(0|([1-9][0-9]*))(\.[\d]{1,2})?$/.test(e)) {
-      ElMessage.error(t('vaildate.amount.NonNegFormat'))
+      pigeon.error(t('vaildate.amount.NonNegFormat'))
       return
     }
 
     const amount = Number(e)
     if (amount < minQuota || amount > maxQuota) {
-      ElMessage.error(t('global.validator.v14', { minQuota, maxQuota }))
+      pigeon.error(t('global.validator.v14', { minQuota, maxQuota }))
       return
     }
 
     if (yearTransferAmountQuota) {
       const add = _.add(usedQuota, amount)
       if (add > yearTransferAmountQuota) {
-        ElMessage.error(t('Ucard.GlobalOrder.rateTip'))
+        pigeon.error(t('Ucard.GlobalOrder.rateTip'))
         return
       }
     }
@@ -968,7 +968,7 @@
       feeNum.value = divideNum(res.data.deductionFee, businessForm.fieldData.exchangeRate)
       await setData(globalCurrenciesField.value)
     } else {
-      ElMessage.error(res.msg)
+      pigeon.error(res.msg)
     }
   }
 
@@ -1069,7 +1069,7 @@
         return item
       })
     } else {
-      ElMessage.error(res.msg)
+      pigeon.error(res.msg)
     }
   }
 
@@ -1106,10 +1106,10 @@
               cId: user.value.cId,
             })
             if (res.code == Code.StatusOK) {
-              ElMessage.success(t('Ucard.GlobalOrder.CancelOrderSuccess'))
+              pigeon.success(t('Ucard.GlobalOrder.CancelOrderSuccess'))
               searchFunc()
             } else {
-              ElMessage.error(res.msg)
+              pigeon.error(res.msg)
             }
           })
           .catch(() => {})
@@ -1124,7 +1124,7 @@
 
   const searchFunc = async () => {
     if (!display.value['R-GlobalOrder-List']?.show) {
-      ElMessage.warning($t('Msg.NotDisplay'))
+      pigeon.warning($t('Msg.NotDisplay'))
       return
     }
 
@@ -1153,13 +1153,13 @@
         businessList.value = res.data
         pagerInfo.rowTotal = res.page?.rowTotal || 0
         pagerInfo.pageTotal = res.page?.pageTotal || 0
-        ElMessage.success(t('Msg.SearchSuccess'))
+        pigeon.success(t('Msg.SearchSuccess'))
       } else {
-        ElMessage.error(res.msg || t('Ucard.Business.ms2'))
+        pigeon.error(res.msg || t('Ucard.Business.ms2'))
       }
     } catch (error) {
       console.error('Search error:', error)
-      ElMessage.error(t('Ucard.Business.ms2'))
+      pigeon.error(t('Ucard.Business.ms2'))
     } finally {
       pictLoading.value = false
     }
@@ -1210,11 +1210,11 @@
       const res = await UcardService.globalOrdersCreate(params)
 
       if (res.code === Code.StatusOK) {
-        ElMessage.success(res.msg)
+        pigeon.success(res.msg)
         globalFormDialog.value = false
         searchFunc()
       } else {
-        ElMessage.error(res.msg)
+        pigeon.error(res.msg)
       }
       addLoading.value = false
     } else {

+ 7 - 7
src/views/card/CardIdTypeConfig/index.vue

@@ -180,7 +180,7 @@
 <script setup>
   import { ref, reactive, computed, onMounted, watch, inject } from 'vue'
   import { useI18n } from 'vue-i18n'
-  import { ElMessage, ElMessageBox } from 'element-plus'
+  import { ElMessageBox } from 'element-plus'
   import Service from '@/service/ucard'
   import Config from '@/config/index'
   import PagePagination from '@/components/pagePagination'
@@ -318,10 +318,10 @@
         ids: multipleSelection.value,
       })
       if (res.code == Code.StatusOK) {
-        ElMessage.success(t('Msg.DeleteSuccess'))
+        pigeon.success(t('Msg.DeleteSuccess'))
         searchFunc()
       } else {
-        ElMessage.error(res.msg)
+        pigeon.error(res.msg)
       }
     } catch (error) {
       // 用户取消删除
@@ -354,7 +354,7 @@
         approvalAllDialog.value = false
         toSearch()
       } else {
-        ElMessage.error(res.msg)
+        pigeon.error(res.msg)
       }
     } catch (error) {
       console.log(error)
@@ -371,7 +371,7 @@
     pictLoading.value = true
 
     if (!display.value['R-IdTypeConfig-Search']?.show) {
-      ElMessage.warning(t('Msg.NotDisplay'))
+      pigeon.warning(t('Msg.NotDisplay'))
       pictLoading.value = false
       return
     }
@@ -392,9 +392,9 @@
       } else {
         pagerInfo.rowTotal = 0
       }
-      ElMessage.success(t('Msg.SearchSuccess'))
+      pigeon.success(t('Msg.SearchSuccess'))
     } else {
-      ElMessage.error(res.msg)
+      pigeon.error(res.msg)
     }
     pictLoading.value = false
   }

+ 6 - 6
src/views/card/CardRecharge/components/add.vue

@@ -141,14 +141,14 @@
       })
 
       if (res.code == Code.StatusOK) {
-        ElMessage.success(t('Msg.Success12'))
-        confirmToReload()
+        pigeon.success(t('Msg.Success12'))
+        // confirmToReload()
       } else {
-        ElMessage.error(res.msg)
+        pigeon.error(res.msg)
       }
     } catch (error) {
       console.error('充值审核失败:', error)
-      ElMessage.error(t('Msg.SystemError'))
+      pigeon.error(t('Msg.SystemError'))
     }
   }
 
@@ -171,11 +171,11 @@
       if (res.code == Code.StatusOK) {
         reasons.value = res.data || {}
       } else {
-        ElMessage.error(res.msg)
+        pigeon.error(res.msg)
       }
     } catch (error) {
       console.error('获取原因列表失败:', error)
-      ElMessage.error(t('Msg.SystemError'))
+      pigeon.error(t('Msg.SystemError'))
     }
   }
   onMounted(() => {

+ 17 - 13
src/views/card/CardRecharge/index.vue

@@ -411,7 +411,6 @@
   import { ref, reactive, computed, onMounted, watch, inject, defineAsyncComponent } from 'vue'
   import { useI18n } from 'vue-i18n'
   import { useRouter } from 'vue-router'
-  import { ElMessage } from 'element-plus'
   import Service from '@/service/ucard'
   import Config from '@/config/index'
   import Service1 from '@/service/customer'
@@ -561,9 +560,14 @@
   // 导出
   const exportAgents = async () => {
     try {
-      await exportExcel('/wasabi/card/recharge/list/export', { ...search }, 'CWG_Card_Recharges')
+      await exportExcel(
+        pigeon,
+        '/wasabi/card/recharge/list/export',
+        { ...search },
+        'CWG_Card_Recharges'
+      )
     } catch (error) {
-      ElMessage.error(t('Msg.ExportFail'))
+      pigeon.error(t('Msg.ExportFail'))
     }
   }
 
@@ -629,7 +633,7 @@
         await searchRealAll(cId)
       }
     } else {
-      ElMessage.error(res.msg)
+      pigeon.error(res.msg)
     }
   }
 
@@ -639,7 +643,7 @@
     if (res.code == Code.StatusOK) {
       reasons.value = res.data || {}
     } else {
-      ElMessage.error(res.msg)
+      pigeon.error(res.msg)
     }
   }
 
@@ -678,10 +682,10 @@
         rechargeFee: 0,
       })
       approvalAllDialog.value = false
-      ElMessage.success('审核成功')
+      pigeon.success('审核成功')
       confirmToReload()
     } else {
-      ElMessage.error(res.msg)
+      pigeon.error(res.msg)
     }
   }
 
@@ -698,7 +702,7 @@
       formInfo.value.realList = res.data
       dialogInfoCid.value = true
     } else {
-      ElMessage.error(res.msg)
+      pigeon.error(res.msg)
     }
   }
 
@@ -758,10 +762,10 @@
       cId: user.value.cId,
     })
     if (res.code == Code.StatusOK) {
-      ElMessage.success(t('Msg.SearchSuccess'))
+      pigeon.success(t('Msg.SearchSuccess'))
       searchFunc()
     } else {
-      ElMessage.error(res.msg)
+      pigeon.error(res.msg)
     }
   }
 
@@ -774,7 +778,7 @@
   const searchFunc = async () => {
     pictLoading.value = true
     if (!display.value['R-Recharge-Search']?.show) {
-      ElMessage.warning(t('Msg.NotDisplay'))
+      pigeon.warning(t('Msg.NotDisplay'))
       pictLoading.value = false
       return
     }
@@ -798,9 +802,9 @@
         pagerInfo.rowTotal = 0
       }
 
-      ElMessage.success(t('Msg.SearchSuccess'))
+      pigeon.success(t('Msg.SearchSuccess'))
     } else {
-      ElMessage.error(res.msg)
+      pigeon.error(res.msg)
     }
     pictLoading.value = false
   }

+ 8 - 9
src/views/card/CardTransactions/index.vue

@@ -239,7 +239,6 @@
 <script setup>
   import { ref, reactive, computed, watch, onMounted, inject } from 'vue'
   import { useRouter } from 'vue-router'
-  import { ElMessage } from 'element-plus'
   import Service from '@/service/ucard'
   import Config from '@/config'
   import Service1 from '@/service/customer'
@@ -314,7 +313,7 @@
       searchRealAll(cId)
       // }
     } else {
-      ElMessage.error(res.msg)
+      pigeon.error(res.msg)
     }
   }
 
@@ -331,7 +330,7 @@
       formInfo.value.realList = res.data
       dialogInfoCid.value = true
     } else {
-      ElMessage.error(res.msg)
+      pigeon.error(res.msg)
     }
   }
 
@@ -353,10 +352,10 @@
   const updateCardTypes = async () => {
     const res = await Service.updateCardTypes({})
     if (res.code == Code.StatusOK) {
-      ElMessage.success(t('Msg.SearchSuccess'))
+      pigeon.success(t('Msg.SearchSuccess'))
       searchFunc()
     } else {
-      ElMessage.error(res.msg)
+      pigeon.error(res.msg)
     }
   }
 
@@ -378,7 +377,7 @@
   const searchFunc = async () => {
     pictLoading.value = true
     if (!display.value['R-Transactions-Search']?.show) {
-      ElMessage.warning(t('Msg.NotDisplay'))
+      pigeon.warning(t('Msg.NotDisplay'))
       pictLoading.value = false
       return
     }
@@ -399,12 +398,12 @@
         } else {
           pagerInfo.rowTotal = 0
         }
-        ElMessage.success(t('Msg.SearchSuccess'))
+        pigeon.success(t('Msg.SearchSuccess'))
       } else {
-        ElMessage.error(res.msg)
+        pigeon.error(res.msg)
       }
     } catch (error) {
-      ElMessage.error(res.msg)
+      pigeon.error(res.msg)
     }
     pictLoading.value = false
   }

+ 4 - 5
src/views/card/CardUserOrder/index.vue

@@ -186,7 +186,6 @@
 <script setup>
   import { ref, reactive, computed, watch, onMounted, inject } from 'vue'
   import { useRouter } from 'vue-router'
-  import { ElMessage } from 'element-plus'
   import Service from '@/service/ucard'
   import PagePagination from '@/components/pagePagination'
   import Config from '@/config/index'
@@ -273,7 +272,7 @@
   // 列表
   const searchFunc = async () => {
     if (!display.value['R-UserOrder-Search']?.show) {
-      ElMessage.warning(t('Msg.NotDisplay'))
+      pigeon.warning(t('Msg.NotDisplay'))
       return
     }
 
@@ -302,12 +301,12 @@
         mock_tableData.value = res.data || []
         pagerInfo.rowTotal = res.page?.rowTotal || 0
         pagerInfo.pageTotal = res.page?.pageTotal || 0
-        ElMessage.success(t('Msg.SearchSuccess'))
+        pigeon.success(t('Msg.SearchSuccess'))
       } else {
-        ElMessage.error(res.msg)
+        pigeon.error(res.msg)
       }
     } catch (error) {
-      ElMessage.error(t('Msg.SearchFailed'))
+      pigeon.error(t('Msg.SearchFailed'))
     } finally {
       pictLoading.value = false
     }

+ 13 - 12
src/views/card/CardUserRights/index.vue

@@ -246,7 +246,7 @@
 <script setup>
   import { ref, reactive, computed, onMounted, watch, inject } from 'vue'
   import { useI18n } from 'vue-i18n'
-  import { ElMessage, ElMessageBox } from 'element-plus'
+  import { ElMessageBox } from 'element-plus'
   import PagePagination from '@/components/pagePagination'
   import Service from '@/service/ucard'
   import Config from '@/config/index'
@@ -256,6 +256,7 @@
   const { t } = useI18n()
   const { Code } = Config
   const Session = inject('session')
+  const pigeon = inject('pigeon')
 
   // Refs
   const formRef = ref(null)
@@ -370,10 +371,10 @@
           cId: user.value.cId,
         })
         if (res.code == 200) {
-          ElMessage.success(t('Msg.DeleteSuccess'))
+          pigeon.success(t('Msg.DeleteSuccess'))
           toSearch()
         } else {
-          ElMessage.error(res.msg)
+          pigeon.error(res.msg)
         }
       })
     }
@@ -387,13 +388,13 @@
         cId: user.value.cId,
       })
       if (res.code == 200) {
-        ElMessage.success(t('card.Info.t27'))
+        pigeon.success(t('card.Info.t27'))
         searchFunc()
       } else {
-        ElMessage.error(res.msg)
+        pigeon.error(res.msg)
       }
     } catch (error) {
-      ElMessage.error(t('Msg.SystemError'))
+      pigeon.error(t('Msg.SystemError'))
     }
   }
 
@@ -477,10 +478,10 @@
         areaList: null,
       })
       approvalAllDialog.value = false
-      ElMessage.success(t('card.Info.t28'))
+      pigeon.success(t('card.Info.t28'))
       toSearch()
     } else {
-      ElMessage.error(res.msg)
+      pigeon.error(res.msg)
     }
   }
 
@@ -494,7 +495,7 @@
     pictLoading.value = true
 
     if (!display.value['R-UserRights-Search']?.show) {
-      ElMessage.warning(t('Msg.NotDisplay'))
+      pigeon.warning(t('Msg.NotDisplay'))
       pictLoading.value = false
       return
     }
@@ -515,9 +516,9 @@
       } else {
         pagerInfo.rowTotal = 0
       }
-      ElMessage.success(t('Msg.SearchSuccess'))
+      pigeon.success(t('Msg.SearchSuccess'))
     } else {
-      ElMessage.error(res.msg)
+      pigeon.error(res.msg)
     }
     pictLoading.value = false
   }
@@ -545,7 +546,7 @@
         }
       })
     } else {
-      ElMessage.error(res.msg)
+      pigeon.error(res.msg)
     }
   }
 

+ 3 - 4
src/views/card/CardWithdrawTransaction/index.vue

@@ -159,7 +159,6 @@
   import { exportExcel } from '@/utils/export'
   import PagePagination from '@/components/pagePagination/index.vue'
   import { Search } from '@element-plus/icons-vue'
-  import { ElMessage } from 'element-plus'
 
   const { t } = useI18n()
   const { Code } = Config
@@ -203,7 +202,7 @@
     pictLoading.value = true
     if (!display.value['R-Card-BlockchainTransaction-Page']?.show) {
       // 假设有Message组件可用
-      ElMessage.warning(t('Msg.NotDisplay'))
+      pigeon.warning(t('Msg.NotDisplay'))
       pictLoading.value = false
       return
     }
@@ -222,9 +221,9 @@
       } else {
         pagerInfo.rowTotal = 0
       }
-      ElMessage.success(t('Msg.SearchSuccess'))
+      pigeon.success(t('Msg.SearchSuccess'))
     } else {
-      ElMessage.error(res.msg)
+      pigeon.error(res.msg)
     }
     pictLoading.value = false
   }

+ 4 - 5
src/views/card/components/CardDetailRecharge/index.vue

@@ -173,7 +173,6 @@
   import { ref, reactive, computed, onMounted, watch, inject } from 'vue'
   import { useI18n } from 'vue-i18n'
   import { useRouter } from 'vue-router'
-  import { ElMessage } from 'element-plus'
   import Service from '@/service/ucard'
   import Config from '@/config'
   import Service2 from '@/service/apply'
@@ -242,7 +241,7 @@
         'CWG_Card_Recharges'
       )
     } catch (error) {
-      ElMessage.error(t('Msg.ExportFail'))
+      pigeon.error(t('Msg.ExportFail'))
     }
   }
 
@@ -272,7 +271,7 @@
   const searchFunc = async () => {
     pictLoading.value = true
     if (!display.value['R-Recharge-Search']?.show) {
-      ElMessage.warning(t('Msg.NotDisplay'))
+      pigeon.warning(t('Msg.NotDisplay'))
       pictLoading.value = false
       return
     }
@@ -299,9 +298,9 @@
         pagerInfo.rowTotal = 0
       }
 
-      ElMessage.success(t('Msg.SearchSuccess'))
+      pigeon.success(t('Msg.SearchSuccess'))
     } else {
-      ElMessage.error(res.msg)
+      pigeon.error(res.msg)
     }
     pictLoading.value = false
   }

+ 4 - 5
src/views/card/components/CardDetailTransactions/index.vue

@@ -173,7 +173,6 @@
   import { ref, reactive, computed, onMounted, inject } from 'vue'
   import { useI18n } from 'vue-i18n'
   import { useRouter } from 'vue-router'
-  import { ElMessage } from 'element-plus'
   import Service from '@/service/ucard'
   import Config from '@/config/index'
   import { exportExcel } from '@/utils/export'
@@ -234,7 +233,7 @@
         'Bank_Card_Transactions'
       )
     } catch (error) {
-      ElMessage.error(t('Msg.ExportFail'))
+      pigeon.error(t('Msg.ExportFail'))
     }
   }
 
@@ -247,7 +246,7 @@
   const searchFunc = async () => {
     pictLoading.value = true
     if (!display.value['R-Transactions-Search']?.show) {
-      ElMessage.warning(t('Msg.NotDisplay'))
+      pigeon.warning(t('Msg.NotDisplay'))
       pictLoading.value = false
       return
     }
@@ -270,9 +269,9 @@
         pagerInfo.rowTotal = 0
       }
 
-      ElMessage.success(t('Msg.SearchSuccess'))
+      pigeon.success(t('Msg.SearchSuccess'))
     } else {
-      ElMessage.error(res.msg)
+      pigeon.error(res.msg)
     }
     pictLoading.value = false
   }

+ 4 - 5
src/views/card/components/CardDetailWithdraw/index.vue

@@ -125,7 +125,6 @@
   import { ref, reactive, computed, onMounted, watch, inject } from 'vue'
   import { useI18n } from 'vue-i18n'
   import { useRouter } from 'vue-router'
-  import { ElMessage } from 'element-plus'
   import Service from '@/service/ucard'
   import Config from '@/config/index'
   import { exportExcel } from '@/utils/export'
@@ -194,7 +193,7 @@
         'Card_Withdraw_Transactions'
       )
     } catch (error) {
-      ElMessage.error(t('Msg.ExportFail'))
+      pigeon.error(t('Msg.ExportFail'))
     }
   }
 
@@ -212,7 +211,7 @@
   const searchFunc = async () => {
     pictLoading.value = true
     if (!display.value['R-Card-WithdrawTransaction-Page']?.show) {
-      ElMessage.warning(t('Msg.NotDisplay'))
+      pigeon.warning(t('Msg.NotDisplay'))
       pictLoading.value = false
       return
     }
@@ -235,9 +234,9 @@
         pagerInfo.rowTotal = 0
       }
 
-      ElMessage.success(t('Msg.SearchSuccess'))
+      pigeon.success(t('Msg.SearchSuccess'))
     } else {
-      ElMessage.error(res.msg)
+      pigeon.error(res.msg)
     }
     pictLoading.value = false
   }

+ 12 - 16
src/views/components/PaymentTransfer/index.vue

@@ -868,11 +868,11 @@
     sourceFundsOptions,
   } from '@/views/components/PaymentTransfer/const'
   import { Delete, Plus } from '@element-plus/icons-vue'
-  import { ElMessage } from 'element-plus'
 
   const { t } = useI18n()
   const { Code } = Config
   const Session = inject('session')
+  const pigeon = inject('pigeon')
 
   // Props
   const props = defineProps({
@@ -1293,13 +1293,13 @@
         } else {
           // 这里需要根据具体逻辑调整
         }
-        ElMessage.success(t('Ucard.PaymentTransfer.ms54'))
+        pigeon.success(t('Ucard.PaymentTransfer.ms54'))
         option.onSuccess(res, option.file)
       } else {
         throw new Error(res.msg)
       }
     } catch (error) {
-      ElMessage.error(error.message || t('Ucard.PaymentTransfer.ms55'))
+      pigeon.error(error.message || t('Ucard.PaymentTransfer.ms55'))
       option.onError()
     } finally {
       loadingStates[loadingKey] = false
@@ -1312,7 +1312,7 @@
       await formRef.value.validate()
       return true
     } catch (error) {
-      ElMessage.warning(t('Ucard.PaymentTransfer.ms58'))
+      pigeon.warning(t('Ucard.PaymentTransfer.ms58'))
       return false
     }
   }
@@ -1322,13 +1322,13 @@
     try {
       const res = await apiMethod(params)
       if (res.code === Code.StatusOK) {
-        ElMessage.success(t(successMessage))
+        pigeon.success(t(successMessage))
         return res.data
       } else {
         throw new Error(res.msg)
       }
     } catch (error) {
-      ElMessage.error(error.message || t(errorMessage))
+      pigeon.error(error.message || t(errorMessage))
       return null
     }
   }
@@ -1457,17 +1457,13 @@
         let res = await Service.ucardRate(rateForm)
         if (res.code == Code.StatusOK) {
           rateResult.value = res.data
-          // 注意:这里使用了 $pigeon,在 Vue 3 中可能需要调整
-          // this.$pigeon.MessageOK(t('Ucard.PaymentTransfer.ms64'))
-          ElMessage.success(t('Ucard.PaymentTransfer.ms64'))
+          pigeon.success(t('Ucard.PaymentTransfer.ms64'))
         } else {
-          // this.$pigeon.MessageError(res.msg)
-          ElMessage.error(res.msg)
+          pigeon.error(res.msg)
         }
       } catch (error) {
         // console.error("查询法币汇率失败:", error)
-        // this.$pigeon.MessageError(t("Ucard.PaymentTransfer.ms65"))
-        ElMessage.error(t('Ucard.PaymentTransfer.ms65'))
+        pigeon.error(t('Ucard.PaymentTransfer.ms65'))
       } finally {
         loadingStates.rateQuery = false
       }
@@ -1595,7 +1591,7 @@
     if (res.code === 200 || res.code === 0) {
       countryList.value = res.data
     } else {
-      ElMessage.error(res.msg || t('Ucard.PaymentTransfer.ms71'))
+      pigeon.error(res.msg || t('Ucard.PaymentTransfer.ms71'))
     }
   }
 
@@ -1621,12 +1617,12 @@
     const isLt2M = file.size / 1024 / 1024 < 2
 
     if (!isImage) {
-      ElMessage.error(t('Ucard.PaymentTransfer.ms56'))
+      pigeon.error(t('Ucard.PaymentTransfer.ms56'))
       return false
     }
 
     if (!isLt2M) {
-      ElMessage.error(t('Ucard.PaymentTransfer.ms57'))
+      pigeon.error(t('Ucard.PaymentTransfer.ms57'))
       return false
     }
 

+ 23 - 11
src/views/home2/Home.vue

@@ -56,9 +56,9 @@
                 </el-dropdown-menu>
               </template>
             </el-dropdown>
-            <el-icon class="crm-cursor" style="font-size: 20px; margin-left: 20px"
-              ><Bell
-            /></el-icon>
+            <el-icon class="crm-cursor" style="font-size: 20px; margin-left: 20px">
+              <Bell />
+            </el-icon>
             <i class="crm-cursor iconquanping iconfont icon" @click="fullScreen"></i>
             <el-dropdown trigger="click" class="username crm-cursor">
               <span class="el-dropdown-link">
@@ -164,8 +164,7 @@
   } from 'vue'
   import { useRouter, useRoute } from 'vue-router'
   import { useStore } from 'vuex'
-  import { ElMessage, ElMessageBox } from 'element-plus'
-  import { FullScreen, Refresh, ArrowDown, RefreshRight } from '@element-plus/icons-vue'
+  import { FullScreen, Refresh, ArrowDown, RefreshRight, Bell } from '@element-plus/icons-vue'
   import axios from 'axios'
   import { useI18n } from 'vue-i18n'
 
@@ -178,13 +177,14 @@
   import Service from '@/service/login'
   import Config from '@/config/index'
   import { safeGetUser, safeGetDisplay } from '@/utils/safeJson'
+  import { filterByShowTrue } from '@/utils/utils'
+  import pigeon from '@/lib/pigeon'
 
   const { Code } = Config
   const { t, locale } = useI18n()
   // 引入注入的全局
   const session = inject('session')
   const reload = inject('reload')
-  const pigeon = inject('pigeon')
 
   // Vue 相关
   const router = useRouter()
@@ -253,11 +253,13 @@
   const initDisplay = () => {
     let display = {}
     const userData = safeGetUser(session)
+    console.log(userData.display, '2')
     if (userData && userData.display) {
       userData.display.forEach((item) => {
-        item.children.forEach((item1) => {
-          item1.children = Object.values(item1.btns)
-          item1.children.forEach((item2) => {
+        item.children?.forEach((item1) => {
+          console.log(item1)
+          item1.children = item1.btns ? Object.values(item1.btns) : []
+          item1?.children.forEach((item2) => {
             display[item2.code] = item2
           })
         })
@@ -527,9 +529,19 @@
   const getLoginInfo = async () => {
     const res = await Service.CustomLoginInfo({})
     if (res.code == Code.StatusOK) {
-      store.commit('InitInfo', res.data)
+      const { display, ...rest } = res.data
+      // 权限需要处理,show为false的不展示了
+      const menus = display.map((item) => {
+        return filterByShowTrue(item)
+      })
+      console.log(menus, 'asdaw')
+      const info = { ...rest, display: menus.filter((item) => item) }
+      store.commit('InitInfo', info)
       store.commit('InfoExpire', false)
-      sessionStorage.setItem('info', JSON.stringify(res.data))
+      sessionStorage.setItem('info', JSON.stringify(info))
+      // store.commit('InitInfo', res.data)
+      // store.commit('InfoExpire', false)
+      // sessionStorage.setItem('info', JSON.stringify(res.data))
       pigeon.MessageOK(t('Msg.LoginSuccess'))
       setTimeout(() => {
         loading.value = false

+ 10 - 2
src/views/login/index.vue

@@ -121,6 +121,7 @@
   import type { FormInstance, FormRules } from 'element-plus'
   import { Message, Key } from '@element-plus/icons-vue'
   import { useI18n } from 'vue-i18n'
+  import { filterByShowTrue } from '@/utils/utils'
 
   const { Code } = Config
   const router = useRouter()
@@ -300,9 +301,16 @@
     try {
       const res = await Service.CustomLoginInfo()
       if (res.code === Code.StatusOK) {
-        store.commit('InitInfo', res.data)
+        const { display, ...rest } = res.data
+        // 权限需要处理,show为false的不展示了
+        const menus = display.map((item) => {
+          return filterByShowTrue(item)
+        })
+        console.log(menus, 'asdaw')
+        const info = { ...rest, display: menus.filter((item) => item) }
+        store.commit('InitInfo', info)
         store.commit('InfoExpire', false)
-        sessionStorage.setItem('info', JSON.stringify(res.data))
+        sessionStorage.setItem('info', JSON.stringify(info))
         pigeon.MessageOK(t('Msg.LoginSuccess'))
         setTimeout(() => {
           // 目前可能没有首页先跳有页面的

+ 13 - 12
src/views/system/GoogleEmail/index.vue

@@ -154,7 +154,7 @@
 <script setup>
   import { ref, reactive, computed, onMounted, nextTick, inject } from 'vue'
   import { useI18n } from 'vue-i18n'
-  import { ElMessage, ElMessageBox, ElNotification } from 'element-plus'
+  import { ElMessageBox } from 'element-plus'
   import { Delete, Edit, Search } from '@element-plus/icons-vue'
   import Service from '@/service/google'
   import Config from '@/config'
@@ -162,6 +162,7 @@
   const { t } = useI18n()
   const { Code } = Config
   const Session = inject('session')
+  const pigeon = inject('pigeon')
 
   // 响应式数据
   const loading = ref(false)
@@ -259,7 +260,7 @@
   const fetchData = async () => {
     loading.value = true
     if (!display.value['R-GoogleGroup-Search']?.show) {
-      ElMessage.warning(t('Msg.NotDisplay'))
+      pigeon.warning(t('Msg.NotDisplay'))
       loading.value = false
       return
     }
@@ -277,11 +278,11 @@
         tableData.value = res.data || []
         pagerInfo.rowTotal = res.data.total || 0
       } else {
-        ElMessage.error(res.msg || t('Msg.SearchFail'))
+        pigeon.error(res.msg || t('Msg.SearchFail'))
       }
     } catch (error) {
       console.error('获取数据失败:', error)
-      ElMessage.error(t('Msg.SystemError'))
+      pigeon.error(t('Msg.SystemError'))
     } finally {
       loading.value = false
     }
@@ -334,15 +335,15 @@
 
       const res = await Service.googleGroupDelete({ ids: [id] })
       if (res.code === Code.StatusOK) {
-        ElMessage.success(t('Msg.DeleteSuccess'))
+        pigeon.success(t('Msg.DeleteSuccess'))
         fetchData()
       } else {
-        ElMessage.error(res.msg || t('Msg.DeleteFail'))
+        pigeon.error(res.msg || t('Msg.DeleteFail'))
       }
     } catch (error) {
       if (error !== 'cancel') {
         console.error('删除失败:', error)
-        ElMessage.error(t('Msg.SystemError'))
+        pigeon.error(t('Msg.SystemError'))
       }
     }
   }
@@ -393,26 +394,26 @@
         // 编辑
         res = await Service.googleGroupUpdate(form)
         if (res.code === Code.StatusOK) {
-          ElMessage.success(t('Msg.ModifySuccess'))
+          pigeon.success(t('Msg.ModifySuccess'))
           handleDialogClose()
           fetchData()
         } else {
-          ElMessage.error(res.msg || t('Msg.ModifyFail'))
+          pigeon.error(res.msg || t('Msg.ModifyFail'))
         }
       } else {
         // 新增
         res = await Service.googleGroupAdd(form)
         if (res.code === Code.StatusOK) {
-          ElMessage.success(t('Msg.SaveSuccess'))
+          pigeon.success(t('Msg.SaveSuccess'))
           handleDialogClose()
           fetchData()
         } else {
-          ElMessage.error(res.msg || t('Msg.SaveFail'))
+          pigeon.error(res.msg || t('Msg.SaveFail'))
         }
       }
     } catch (error) {
       console.error('提交失败:', error)
-      ElMessage.error(t('Msg.SystemError'))
+      pigeon.error(t('Msg.SystemError'))
     } finally {
       submitLoading.value = false
     }

+ 7 - 7
src/views/system/Refusal/components/Add.vue

@@ -29,7 +29,7 @@
 <script setup lang="ts">
   import { ref, reactive, computed, watch, onMounted, inject } from 'vue'
   import { useI18n } from 'vue-i18n'
-  import { ElMessage, FormInstance, FormRules } from 'element-plus'
+  import { FormInstance, FormRules } from 'element-plus'
   import ServiceSystem from '@/service/system'
   import Config from '@/config/index'
   import { Close } from '@element-plus/icons-vue'
@@ -119,13 +119,13 @@
       if (res.code === Code.StatusOK) {
         emit('confirmToReload', true)
         formRef.value.resetFields()
-        ElMessage.success(t('Msg.Success'))
+        pigeon.success(t('Msg.Success'))
       } else {
-        ElMessage.error(res.msg || t('Msg.Fail'))
+        pigeon.error(res.msg || t('Msg.Fail'))
       }
     } catch (error) {
       console.error('添加失败:', error)
-      ElMessage.error(t('Msg.SystemError'))
+      pigeon.error(t('Msg.SystemError'))
     }
   }
 
@@ -150,13 +150,13 @@
         emit('confirmToReload', true)
         emit('closeAdd', false)
         formRef.value.resetFields()
-        ElMessage.success(t('Msg.Success'))
+        pigeon.success(t('Msg.Success'))
       } else {
-        ElMessage.error(res.msg || t('Msg.Fail'))
+        pigeon.error(res.msg || t('Msg.Fail'))
       }
     } catch (error) {
       console.error('更新失败:', error)
-      ElMessage.error(t('Msg.SystemError'))
+      pigeon.error(t('Msg.SystemError'))
     }
   }
 

+ 10 - 9
src/views/system/Refusal/index.vue

@@ -123,7 +123,7 @@
 <script setup>
   import { ref, reactive, computed, onMounted, watch, inject } from 'vue'
   import { useI18n } from 'vue-i18n'
-  import { ElMessage, ElMessageBox } from 'element-plus'
+  import { ElMessageBox } from 'element-plus'
   import Service from '@/service/system'
   import Config from '@/config/index'
   import { Delete, Operation, Plus, Search } from '@element-plus/icons-vue'
@@ -132,6 +132,7 @@
   const { t } = useI18n()
   const { Code } = Config
   const Session = inject('session')
+  const pigeon = inject('pigeon')
 
   // 响应式数据
   const pictLoading = ref(false)
@@ -235,14 +236,14 @@
 
       const res = await Service.reasonsRefusalDelete({ ids: [id] })
       if (res.code == Code.StatusOK) {
-        ElMessage.success(t('Msg.DeleteSuccess'))
+        pigeon.success(t('Msg.DeleteSuccess'))
         searchFunc()
       } else {
-        ElMessage.error(res.msg)
+        pigeon.error(res.msg)
       }
     } catch (error) {
       if (error !== 'cancel') {
-        ElMessage.error(t('Msg.SystemError'))
+        pigeon.error(t('Msg.SystemError'))
       }
     }
   }
@@ -255,9 +256,9 @@
     if (res.code == Code.StatusOK) {
       formList.value = res.data
       dialogInfoTradingAdd.value = true
-      ElMessage.success(t('Msg.SearchSuccess'))
+      pigeon.success(t('Msg.SearchSuccess'))
     } else {
-      ElMessage.error(res.msg)
+      pigeon.error(res.msg)
     }
   }
 
@@ -265,7 +266,7 @@
   const searchFunc = async () => {
     pictLoading.value = true
     if (!display.value['R-Refusal-Search']?.show) {
-      ElMessage.warning(t('Msg.NotDisplay'))
+      pigeon.warning(t('Msg.NotDisplay'))
       pictLoading.value = false
       return
     }
@@ -284,9 +285,9 @@
       } else {
         pagerInfo.rowTotal = 0
       }
-      ElMessage.success(t('Msg.SearchSuccess'))
+      pigeon.success(t('Msg.SearchSuccess'))
     } else {
-      ElMessage.error(res.msg)
+      pigeon.error(res.msg)
     }
     pictLoading.value = false
   }

+ 271 - 0
src/views/system/ShopManage/index.vue

@@ -0,0 +1,271 @@
+<template>
+  <div
+    id="div-content"
+    v-loading="pictLoading"
+    class="view"
+    element-loading-background="rgba(43, 48, 67, 0.65)"
+    element-loading-spinner="el-icon-loading"
+  >
+    <div class="crm_search">
+      <el-form ref="formRef" :model="search" label-width="">
+        <el-row>
+          <el-col :span="24" :md="24" :lg="24">
+            <el-form-item>
+              <el-input
+                v-model.trim="search.merchantName"
+                class="crm-border-radius-no"
+                clearable
+                :placeholder="`${t('Placeholder.Input')}${t('ShopManage.t1')}`"
+                @keyup.enter="toSearch"
+              >
+              </el-input>
+            </el-form-item>
+            <el-form-item>
+              <el-button
+                class="crm-border-radius-no crm-border-left-no"
+                :icon="Search"
+                @click="toSearch"
+              ></el-button>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-form-item v-if="display['R-Role-Add'].show">
+          <div class="search_action_btn">
+            <span class="crm-cursor" @click="handleAdd">
+              <el-icon><Plus /></el-icon>
+              <span>{{ $t('Btn.Add') }}</span>
+            </span>
+          </div>
+        </el-form-item>
+      </el-form>
+    </div>
+    <el-table :data="tableData" stripe style="width: 100%">
+      <el-table-column prop="merchantName" align="left" :label="t('ShopManage.t1')">
+        <template #default="scope">
+          {{ scope.row.merchantName || '--' }}
+        </template>
+      </el-table-column>
+      <el-table-column prop="opt" align="center" :label="$t('Label.Action')">
+        <template #default="scope">
+          <el-dropdown trigger="click" @command="handleCommand">
+            <span class="el-dropdown-link crm-cursor">
+              <i style="font-weight: bold; font-size: 20px" class="iconfont iconcaidan"></i>
+            </span>
+            <template #dropdown>
+              <el-dropdown-menu>
+                <el-dropdown-item
+                  v-if="display['R-Role-Update'].show"
+                  :command="{ type: 'editor', row: scope.row }"
+                >
+                  <el-icon><Edit /></el-icon>
+                  <span>{{ $t('Btn.Editor') }}</span>
+                </el-dropdown-item>
+                <el-dropdown-item
+                  v-if="display['R-Role-Delete'].show"
+                  :command="{ type: 'delete', id: scope.row.id }"
+                >
+                  <el-icon><Delete /></el-icon>
+                  <span>{{ $t('Btn.Delete') }}</span>
+                </el-dropdown-item>
+              </el-dropdown-menu>
+            </template>
+          </el-dropdown>
+        </template>
+      </el-table-column>
+    </el-table>
+    <PagePagination
+      :pager-info="pagerInfo"
+      @current-change="handleCurrentChange"
+      @size-change="handleSizeChange"
+    />
+
+    <!-- 新增 -->
+    <el-dialog
+      v-model="dialogVisible"
+      :title="t(isEdit ? 'ShopManage.edit' : 'ShopManage.add')"
+      width="500px"
+      :close-on-click-modal="false"
+    >
+      <el-form ref="addFormRef" :model="addForm" :rules="rules" label-width="120px">
+        <el-form-item :label="`${t('ShopManage.t1')}:`" prop="merchantName">
+          <el-input v-model.trim="addForm.merchantName" :placeholder="t('Placeholder.Input')">
+          </el-input>
+        </el-form-item>
+      </el-form>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button @click="dialogVisible = false">{{ t('Btn.Cancel') }} </el-button>
+          <el-button type="primary" :loading="addLoading" @click="handleConfirm"
+            >{{ t('Btn.Confirm') }}
+          </el-button>
+        </div>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+<script setup lang="ts">
+  import { Delete, Edit, Plus, Search } from '@element-plus/icons-vue'
+  import { departmentNames } from '@/views/user/userRole/const'
+  import { computed, inject, onMounted, reactive, ref } from 'vue'
+  import PagePagination from '@/components/pagePagination/index.vue'
+  import Service from '@/service/user'
+  import { useI18n } from 'vue-i18n'
+  import Config from '@/config'
+  import { ElMessageBox } from 'element-plus'
+
+  const { Code } = Config
+  const Session = inject('session')
+  const pigeon = inject('pigeon')
+  const { t } = useI18n()
+  const tableData = ref([])
+  const dialogVisible = ref(false)
+  const isEdit = ref(false)
+  const addLoading = ref(false)
+  const formRef = ref(null)
+  const addFormRef = ref(null)
+  const addForm = reactive({})
+  // reactive 响应式对象
+  const search = reactive({
+    merchantName: '',
+  })
+
+  const pictLoading = ref(false)
+  // computed 计算属性
+  const display = computed(() => {
+    const displayData = Session.Get('display', true)
+    return displayData ? JSON.parse(displayData) : {}
+  })
+  const pagerInfo = reactive({
+    row: 10,
+    current: 1,
+    pageTotal: 0,
+    rowTotal: 0,
+  })
+  const searchFunc = async () => {
+    pictLoading.value = true
+
+    if (!display.value['R-ShopManage-Page']?.show) {
+      pigeon.MessageWarning(t('Msg.NotDisplay'))
+      pictLoading.value = false
+      return
+    }
+
+    try {
+      const res = await Service.getShopManage({
+        ...search,
+        page: {
+          current: pagerInfo.current,
+          row: pagerInfo.row,
+        },
+      })
+
+      if (res.code == Code.StatusOK) {
+        console.log(res)
+        tableData.value = res.data
+        if (res.page != null) {
+          pagerInfo.rowTotal = res.page.rowTotal
+          pagerInfo.pageTotal = res.page.pageTotal
+        } else {
+          pagerInfo.rowTotal = 0
+        }
+        pigeon.MessageOK(t('Msg.SearchSuccess'))
+      } else {
+        pigeon.MessageError(res.msg)
+      }
+    } catch (error) {
+      console.log(error)
+    } finally {
+      pictLoading.value = false
+    }
+  }
+
+  const toSearch = () => {
+    pagerInfo.current = 1
+    searchFunc()
+  }
+  const handleAdd = () => {
+    Object.assign(addForm, {})
+    isEdit.value = false
+    dialogVisible.value = true
+  }
+  const handleConfirm = async () => {
+    const valid = await addFormRef.value.validate()
+    if (!valid) return
+    addLoading.value = true
+    try {
+      const params = { ...addForm }
+      const res = isEdit.value
+        ? await Service.shopManageEdit(params)
+        : await Service.shopManageAdd(params)
+      if (res.code == Code.StatusOK) {
+        dialogVisible.value = false
+        searchFunc()
+      } else {
+        pigeon.MessageError(res.msg)
+      }
+      addLoading.value = false
+    } catch (error) {
+      console.error(error)
+    }
+  }
+
+  const handleSizeChange = (val) => {
+    pagerInfo.row = val
+    searchFunc()
+  }
+
+  const handleCurrentChange = (val) => {
+    pagerInfo.current = val
+    searchFunc()
+  }
+  // 删除
+  const handleDelete = async (id) => {
+    try {
+      await ElMessageBox.confirm(
+        t('Ucard.Blockchain.deleteConfirm'),
+        t('Ucard.Blockchain.deleteTitle'),
+        {
+          confirmButtonText: t('Btn.Confirm'),
+          cancelButtonText: t('Btn.Cancel'),
+          type: 'warning',
+        }
+      )
+
+      const res = await Service.shopManageDel({ id })
+      if (res.code == Code.StatusOK) {
+        pigeon.MessageOk(t('Msg.DeleteSuccess'))
+        searchFunc() // 刷新列表
+      } else {
+        pigeon.MessageError(res.msg)
+      }
+    } catch (error) {
+      console.log(error)
+    }
+  }
+  // 处理下拉菜单命令
+  const handleCommand = (command) => {
+    if (command.type === 'editor') {
+      Object.assign(addForm, command.row)
+      isEdit.value = true
+      dialogVisible.value = true
+    } else if (command.type === 'delete') {
+      console.log(command.id)
+      handleDelete(command.id)
+    }
+  }
+
+  // 挂载生命周期
+  onMounted(() => {
+    searchFunc()
+  })
+</script>
+
+<style scoped lang="scss">
+  #div-content {
+    .dialog_header_w {
+      .crm_search_down {
+        width: 400px;
+      }
+    }
+  }
+</style>

+ 18 - 0
src/views/user/userList/components/UserAdd.vue

@@ -230,6 +230,19 @@
           <el-option :label="$t('State.employmentStatus2')" :value="2"></el-option>
         </el-select>
       </el-form-item>
+      <el-form-item :label="$t('Label.Merchant') + ':'">
+        <el-switch
+          v-model="form.isMerchantRole"
+          class="crm_switch"
+          :active-value="1"
+          :inactive-value="0"
+          :active-text="$t('Btn.Yes')"
+          :inactive-text="$t('Btn.No')"
+          active-color="#368FEC"
+          inactive-color="#EB3F57"
+        >
+        </el-switch>
+      </el-form-item>
       <el-form-item :label="$t('Label.LoginState') + ':'">
         <el-switch
           v-model="form.valid"
@@ -256,6 +269,7 @@
         >
         </el-switch>
       </el-form-item>
+
       <el-form-item v-show="form.ipLimit" :label="$t('Label.limitIp') + ':'">
         <el-input v-model.trim="form.limitIp" :placeholder="$t('Placeholder.Input')"></el-input>
       </el-form-item>
@@ -328,6 +342,10 @@
   const GetRuleDropdownListComputed = computed(() => {
     return GetRuleDropdown.value.filter((item: any) => item.salesType == form.salesType)
   })
+  const role_system = computed(() => {
+    const user = JSON.parse(Session.Get('user', true) || '{}')
+    return user.departmentId == null && user.roleName == 'ROLE_SYSTEM'
+  })
 
   // Methods
   const selectChangesalesType = (val: number) => {

+ 25 - 24
src/views/user/userList/index.vue

@@ -658,7 +658,7 @@
 
 <script setup>
   import { ref, computed, onMounted, watch, inject } from 'vue'
-  import { ElMessage, ElMessageBox } from 'element-plus'
+  import { ElMessageBox } from 'element-plus'
   import Service from '@/service/user'
   import ServiceEnter from '@/service/enter'
   import Config from '@/config/index'
@@ -679,6 +679,7 @@
 
   const { Code, Host00 } = Config
   const Session = inject('session')
+  const pigeon = inject('pigeon')
   const { t } = useI18n()
 
   // Refs
@@ -808,7 +809,7 @@
     linkEle.value = linkEle.value.split('--')[0]
     linkEle.select()
     document.execCommand('Copy')
-    ElMessage.success(t('Dashboard.Profile.CopySuccess'))
+    pigeon.MessageOK(t('Dashboard.Profile.CopySuccess'))
   }
 
   const handleCommand = (command) => {
@@ -887,7 +888,7 @@
       groupType_options.value = res.data
       dialogCheck1.value = true
     } else {
-      ElMessage.error(res.msg)
+      pigeon.MessageError(res.msg)
     }
   }
 
@@ -908,13 +909,13 @@
           defaultGroupType: dialogCheck_form1.value.defaultGroupType || null,
         })
         if (res.code == Code.StatusOK) {
-          ElMessage.success(t('Msg.ModifySuccess'))
+          pigeon.MessageOK(t('Msg.ModifySuccess'))
           cancel()
           searchFunc()
           flag.value = false
         } else {
           flag.value = false
-          ElMessage.error(res.msg)
+          pigeon.MessageError(res.msg)
         }
       } else {
         return false
@@ -936,13 +937,13 @@
           excludeShowLoginTypes: dialogCheckAccountSetup_form.value.excludeShowLoginTypes || null,
         })
         if (res.code == Code.StatusOK) {
-          ElMessage.success(t('Msg.ModifySuccess'))
+          pigeon.MessageOK(t('Msg.ModifySuccess'))
           cancelAccountSetup()
           searchFunc()
           flag.value = false
         } else {
           flag.value = false
-          ElMessage.error(res.msg)
+          pigeon.MessageError(res.msg)
         }
       } else {
         return false
@@ -977,13 +978,13 @@
           loginName: dialogCheck_formUnseal.value.loginName,
         })
         if (res.code == Code.StatusOK) {
-          ElMessage.success(t('Msg.ModifySuccess'))
+          pigeon.MessageOK(t('Msg.ModifySuccess'))
           cancel()
           searchFunc()
           flag.value = false
         } else {
           flag.value = false
-          ElMessage.error(res.msg)
+          pigeon.MessageError(res.msg)
         }
       } else {
         return false
@@ -1001,13 +1002,13 @@
       id: dialogCheckKey_form.value.id,
     })
     if (res.code == Code.StatusOK) {
-      ElMessage.success(t('Msg.ModifySuccess'))
+      pigeon.MessageOK(t('Msg.ModifySuccess'))
       dialogCheckKey.value = false
       searchFunc()
       flag.value = false
     } else {
       flag.value = false
-      ElMessage.error(res.msg)
+      pigeon.MessageError(res.msg)
     }
   }
 
@@ -1021,13 +1022,13 @@
       id: dialogCheckKey_form.value.id,
     })
     if (res.code == Code.StatusOK) {
-      ElMessage.success(t('Msg.ModifySuccess'))
+      pigeon.MessageOK(t('Msg.ModifySuccess'))
       dialogCheckKey.value = false
       searchFunc()
       flag.value = false
     } else {
       flag.value = false
-      ElMessage.error(res.msg)
+      pigeon.MessageError(res.msg)
     }
   }
 
@@ -1056,7 +1057,7 @@
             })
             .catch(() => {})
         } else {
-          ElMessage.error(res.msg)
+          pigeon.MessageError(res.msg)
           flag.value = false
         }
       } else {
@@ -1079,7 +1080,7 @@
       dialogCheckKey_key.value = res.data
       flag.value = false
     } else {
-      ElMessage.error(res.msg)
+      pigeon.MessageError(res.msg)
       flag.value = false
     }
   }
@@ -1130,10 +1131,10 @@
         ids.push(id)
         let res = await Service.userListDelete({ ids: ids })
         if (res.code == Code.StatusOK) {
-          ElMessage.success(t('Msg.DeleteSuccess'))
+          pigeon.MessageOK(t('Msg.DeleteSuccess'))
           searchFunc()
         } else {
-          ElMessage.error(res.msg)
+          pigeon.MessageError(res.msg)
         }
       })
       .catch(() => {})
@@ -1148,7 +1149,7 @@
       addType.value = 'user_CustomerList'
       dialogInfoTradingAdd.value = true
     } else {
-      ElMessage.error(res.msg)
+      pigeon.MessageError(res.msg)
     }
   }
 
@@ -1157,14 +1158,14 @@
     if (res.code == Code.StatusOK) {
       roleName.value = res.data
     } else {
-      ElMessage.error(res.msg)
+      pigeon.MessageError(res.msg)
     }
   }
 
   const searchFunc = async () => {
     pictLoading.value = true
     if (!display.value['R-UserList-Search'].show) {
-      ElMessage.warning(t('Msg.NotDisplay'))
+      pigeon.MessageWarning(t('Msg.NotDisplay'))
       pictLoading.value = false
       return
     }
@@ -1193,10 +1194,10 @@
       } else {
         pagerInfo.value.rowTotal = 0
       }
-      ElMessage.success(t('Msg.SearchSuccess'))
+      pigeon.MessageOK(t('Msg.SearchSuccess'))
       pictLoading.value = false
     } else {
-      ElMessage.error(res.msg)
+      pigeon.MessageError(res.msg)
       pictLoading.value = false
     }
   }
@@ -1223,7 +1224,7 @@
   const CopyShareLinks = async (link) => {
     try {
       await navigator.clipboard.writeText(link)
-      ElMessage.success(t('Dashboard.Profile.CopySuccess'))
+      pigeon.MessageOK(t('Dashboard.Profile.CopySuccess'))
     } catch (err) {
       copyText(link)
     }
@@ -1236,7 +1237,7 @@
     textarea.select()
     try {
       document.execCommand('copy')
-      ElMessage.success(t('Dashboard.Profile.CopySuccess'))
+      pigeon.MessageOK(t('Dashboard.Profile.CopySuccess'))
     } catch (err) {
       // console.log(err)
     }

+ 71 - 26
src/views/user/userRole/components/RoleAdd/index.vue

@@ -28,6 +28,21 @@
           ></el-option>
         </el-select>
       </el-form-item>
+      <el-form-item v-if="role_system" prop="merchantId" :label="$t('Label.ShopName') + ':'">
+        <el-select
+          v-model="form.merchantId"
+          class="crm_search_down"
+          :placeholder="$t('Placeholder.Choose')"
+          @change="selectChange"
+        >
+          <el-option
+            v-for="(item, index) in shopNames"
+            :key="index"
+            :label="item.name"
+            :value="item.id"
+          ></el-option>
+        </el-select>
+      </el-form-item>
       <el-form-item class="authorityBox" :label="$t('Label.permissions') + ':'">
         <div
           style="
@@ -196,15 +211,16 @@
 
 <script setup>
   import { ref, reactive, computed, onMounted, watch, inject } from 'vue'
-  import { CirclePlus, Edit, Delete, Close } from '@element-plus/icons-vue'
-  import { ElMessage, ElMessageBox } from 'element-plus'
+  import { CirclePlus, Edit, Delete } from '@element-plus/icons-vue'
   import ServiceUser from '@/service/user'
   import Config from '@/config/index'
   import { useI18n } from 'vue-i18n'
+  import { safeGetUser } from '@/utils/safeJson'
 
   const { Code } = Config
   const { t } = useI18n()
   const Session = inject('session')
+  const pigeon = inject('pigeon')
 
   // props
   const props = defineProps({
@@ -238,6 +254,7 @@
   // reactive data
   const form = reactive({})
   const group = ref([])
+  const shopNames = ref([])
   const roleTreeDate = ref([])
   const defaultSelect = ref([])
   const data_check = ref([])
@@ -272,6 +289,9 @@
     return user.departmentId == null && user.roleName == 'ROLE_SYSTEM'
   })
 
+  const display = computed(() => {
+    return safeGetUser(Session)?.display
+  })
   // rules
   const rules = reactive({
     name: [
@@ -409,10 +429,28 @@
       if (res.code == Code.StatusOK) {
         group.value = res.data
       } else {
-        ElMessage.error(res.msg)
+        pigeon.error(res.msg)
+      }
+    } catch (error) {
+      console.log(error)
+    }
+  }
+  const getShopList = async () => {
+    try {
+      const res = await ServiceUser.getShopManageList({})
+      console.log(res)
+      if (res.code == Code.StatusOK) {
+        shopNames.value = res.data.map((item) => {
+          return {
+            id: item.id,
+            name: item.merchantName,
+          }
+        })
+      } else {
+        pigeon.error(res.msg)
       }
     } catch (error) {
-      ElMessage.error(t('Msg.RequestError'))
+      console.log(error)
     }
   }
 
@@ -490,9 +528,9 @@
           })
 
           if (res.code == Code.StatusOK) {
-            ElMessage.success(res.msg)
+            pigeon.success(res.msg)
           } else {
-            ElMessage.error(res.msg)
+            pigeon.error(res.msg)
           }
         } else if (typeIndex == 3) {
           dialogCheck_form.code = dialogCheck_form.name
@@ -500,9 +538,9 @@
             ...dialogCheck_form,
           })
           if (res.code == Code.StatusOK) {
-            ElMessage.success(res.msg)
+            pigeon.success(res.msg)
           } else {
-            ElMessage.error(res.msg)
+            pigeon.error(res.msg)
           }
         }
         cancel()
@@ -514,6 +552,7 @@
   }
   const getRoleDetailUpdate = async () => {
     // 复制表单数据
+    console.log('bianji')
     Object.assign(form, props.formList)
 
     try {
@@ -523,16 +562,20 @@
 
       if (res.code === Code.StatusOK) {
         // 处理角色树数据
+        console.log(res.data, '角色')
         const processedData = processRoleTreeData(res.data)
-        roleTreeDate.value = processedData.data
+        const processedData2 = processRoleTreeData(display.value)
+
+        console.log(processedData, processedData2)
+        roleTreeDate.value = role_system.value ? processedData.data : processedData2.data
         defaultSelect.value = processedData.select
       } else {
-        ElMessage.error(res.msg || t('Msg.RequestError'))
+        pigeon.error(res.msg || t('Msg.RequestError'))
       }
       loading.value = false
     } catch (error) {
       console.error('获取角色详情失败:', error)
-      ElMessage.error(t('Msg.RequestError'))
+      pigeon.error(t('Msg.RequestError'))
     }
   }
   // 处理角色树数据的函数(可以独立出来复用)
@@ -605,9 +648,9 @@
           })
 
           if (res.code == Code.StatusOK) {
-            ElMessage.success(res.msg)
+            pigeon.success(res.msg)
           } else {
-            ElMessage.error(res.msg)
+            pigeon.error(res.msg)
           }
         } else if (typeIndex == 3) {
           dialogCheck_form.code = dialogCheck_form.name
@@ -615,9 +658,9 @@
             ...dialogCheck_form,
           })
           if (res.code == Code.StatusOK) {
-            ElMessage.success(res.msg)
+            pigeon.success(res.msg)
           } else {
-            ElMessage.error(res.msg)
+            pigeon.error(res.msg)
           }
         }
         cancel()
@@ -639,18 +682,18 @@
           })
 
           if (res.code == Code.StatusOK) {
-            ElMessage.success(res.msg)
+            pigeon.success(res.msg)
           } else {
-            ElMessage.error(res.msg)
+            pigeon.error(res.msg)
           }
         } else if (typeIndex == 3) {
           let res = await ServiceUser.authorityActionDelete({
             ...dialogCheck_form,
           })
           if (res.code == Code.StatusOK) {
-            ElMessage.success(res.msg)
+            pigeon.success(res.msg)
           } else {
-            ElMessage.error(res.msg)
+            pigeon.error(res.msg)
           }
         }
         cancel()
@@ -682,13 +725,14 @@
               })) || [],
           }
         })
-        roleTreeDate.value = data
+        const processedData2 = processRoleTreeData(display.value)
+        roleTreeDate.value = role_system.value ? data : processedData2.data
         loading.value = false
       } else {
-        ElMessage.error(res.msg)
+        pigeon.error(res.msg)
       }
     } catch (error) {
-      ElMessage.error(t('Msg.RequestError'))
+      pigeon.error(t('Msg.RequestError'))
     }
   }
 
@@ -721,9 +765,9 @@
       roleTreeDate.value = []
       emit('confirmToReload')
       emit('closeAdd', false)
-      ElMessage.success(t('Msg.Success'))
+      pigeon.success(t('Msg.Success'))
     } else {
-      ElMessage.error(res.msg)
+      pigeon.error(res.msg)
     }
   }
   const roleUpdate = async () => {
@@ -743,9 +787,9 @@
       formRef.value.resetFields()
       emit('confirmToReload')
       emit('closeAdd', false)
-      ElMessage.success(t('Msg.Success'))
+      pigeon.success(t('Msg.Success'))
     } else {
-      ElMessage.error(res.msg)
+      pigeon.error(res.msg)
     }
   }
   //提交成功后回调
@@ -782,6 +826,7 @@
   onMounted(async () => {
     // await Promise.all([getDepartmentList(), getRoleDetailAdd()])
     getDepartmentList()
+    getShopList()
     console.log(props, 'props')
   })
 </script>

+ 19 - 15
src/views/user/userRole/index.vue

@@ -53,6 +53,11 @@
           }}</span>
         </template>
       </el-table-column>
+      <el-table-column prop="merchantName" align="left" :label="$t('Label.ShopName')">
+        <template #default="scope">
+          <span>{{ scope.row.merchantName }}</span>
+        </template>
+      </el-table-column>
       <el-table-column prop="" align="left" :label="$t('Label.Date')">
         <template #default="scope">
           {{ scope.row.addTime || '--' }}
@@ -60,7 +65,7 @@
       </el-table-column>
       <el-table-column prop="" align="center" :label="$t('Label.Action')">
         <template #default="scope">
-          <el-dropdown trigger="click" @command="handleCommand">
+          <el-dropdown v-if="user.roleId !== scope.row.id" trigger="click" @command="handleCommand">
             <span class="el-dropdown-link crm-cursor">
               <i style="font-weight: bold; font-size: 20px" class="iconfont iconcaidan"></i>
             </span>
@@ -114,23 +119,24 @@
       @close-add="closeAdd"
     >
     </RoleAdd>
-    <!--    <div v-if="dialogInfoTradingAdd" class="crm_verified_info_mask" @click="closeDiaAdd"></div>-->
   </div>
 </template>
 
 <script setup>
   import { ref, reactive, computed, onMounted, inject } from 'vue'
   import { Search, Edit, Delete, Plus } from '@element-plus/icons-vue'
-  import { ElMessage, ElMessageBox } from 'element-plus'
+  import { ElMessageBox } from 'element-plus'
   import Service from '@/service/user'
   import Config from '@/config/index'
   import RoleAdd from './components/RoleAdd'
   import { departmentNames } from '@/views/user/userRole/const'
   import { useI18n } from 'vue-i18n'
+  import { safeGetUser } from '@/utils/safeJson'
 
   const { Code } = Config
   const { t } = useI18n()
   const Session = inject('session')
+  const pigeon = inject('pigeon')
 
   // ref 响应式数据
   const pictLoading = ref(false)
@@ -161,6 +167,9 @@
     const displayData = Session.Get('display', true)
     return displayData ? JSON.parse(displayData) : {}
   })
+  const user = computed(() => {
+    return safeGetUser(Session)
+  })
 
   // 方法
   const handleCommand = (command) => {
@@ -169,6 +178,7 @@
         id: command.row.id,
         name: command.row.name,
         departmentId: command.row.departmentId,
+        merchantId: command.row.merchantId,
       })
       addType.value = 'user_Role'
       dialogInfoTradingAdd.value = true
@@ -178,12 +188,6 @@
     }
   }
 
-  const closeDiaAdd = () => {
-    addType.value = ''
-    dialogInfoTradingAdd.value = false
-    editor.value = null
-  }
-
   const closeAdd = (val) => {
     addType.value = ''
     editor.value = null
@@ -212,10 +216,10 @@
 
       const res = await Service.roleListDelete({ id })
       if (res.code == Code.StatusOK) {
-        ElMessage.success(t('Msg.DeleteSuccess'))
+        pigeon.success(t('Msg.DeleteSuccess'))
         searchFunc()
       } else {
-        ElMessage.error(res.msg)
+        pigeon.error(res.msg)
       }
     } catch (error) {
       // 用户取消删除
@@ -227,7 +231,7 @@
     pictLoading.value = true
 
     if (!display.value['R-Role-Search']?.show) {
-      ElMessage.warning(t('Msg.NotDisplay'))
+      pigeon.warning(t('Msg.NotDisplay'))
       pictLoading.value = false
       return
     }
@@ -258,12 +262,12 @@
         } else {
           pagerInfo.rowTotal = 0
         }
-        ElMessage.success(t('Msg.SearchSuccess'))
+        pigeon.success(t('Msg.SearchSuccess'))
       } else {
-        ElMessage.error(res.msg)
+        pigeon.error(res.msg)
       }
     } catch (error) {
-      ElMessage.error(t('Msg.SearchError'))
+      pigeon.error(t('Msg.SearchFail'))
     } finally {
       pictLoading.value = false
     }