Browse Source

chore:系统设置、组件更改权限判断

snow 1 year ago
parent
commit
76a100e2cd

+ 0 - 989
src/api/menu_mock.ts

@@ -2,995 +2,6 @@ export default {
   code: 0,
   message: "获取成功",
   data: [
-    {
-      id: "166",
-      menu_name: "数据看板(超管)",
-      menu_img: "ep:add-location",
-      menu_url: "",
-      menu_route: "dashboard",
-      pid: "0",
-      is_show: "1",
-      is_private: "1",
-      menu_type: "1",
-      weight: "12",
-      child: [
-        {
-          id: "169",
-          menu_name: "利润报表看板",
-          menu_img: "ep:add-location",
-          menu_route: "grossMargin",
-          menu_url: "dashboard/grossMargin/index",
-          pid: "166",
-          is_show: "1",
-          is_private: "1",
-          menu_type: "2",
-          level: "1",
-          status: "1",
-          weight: "1",
-          action: ["001"]
-        },
-        {
-          id: "171",
-          menu_name: "业绩报表",
-          menu_img: "ep:add-location",
-          menu_route: "performanceReport",
-          menu_url: "dashboard/performanceReport/index",
-          pid: "166",
-          is_show: "1",
-          is_private: "1",
-          menu_type: "2",
-          level: "1",
-          status: "1",
-          weight: "1",
-          action: ["001"]
-        }
-      ]
-    },
-    {
-      id: "172",
-      menu_name: "数据看板(业务公司)",
-      menu_img: "ep:add-location",
-      menu_url: "",
-      menu_route: "dashboardCompany",
-      pid: "0",
-      is_show: "1",
-      is_private: "1",
-      menu_type: "1",
-      weight: "11",
-      child: [
-        {
-          id: "173",
-          menu_name: "应收账款报表看板",
-          menu_img: "ep:add-location",
-          menu_route: "accountsReceivable",
-          menu_url: "dashboardCompany/accountsReceivable/index",
-          pid: "172",
-          is_show: "1",
-          is_private: "1",
-          menu_type: "2",
-          level: "2",
-          status: "1",
-          weight: "1",
-          action: ["001"]
-        },
-        {
-          id: "174",
-          menu_name: "超期应收账明细表",
-          menu_img: "ep:add-location",
-          menu_route: "accountsReceivableExpired",
-          menu_url: "dashboardCompany/accountsReceivableExpired/index",
-          pid: "172",
-          is_show: "1",
-          is_private: "1",
-          menu_type: "2",
-          level: "2",
-          status: "1",
-          weight: "1",
-          action: ["001"]
-        }
-      ]
-    },
-    {
-      id: "75",
-      menu_name: "买入对账管理",
-      menu_img: "ep:add-location",
-      menu_url: "purchase/porder/index",
-      menu_route: "purchase",
-      pid: "0",
-      is_show: "1",
-      is_private: "1",
-      menu_type: "1",
-      weight: "10",
-      child: [
-        {
-          id: "76",
-          menu_name: "买入订单管理",
-          menu_img: "ep:management",
-          menu_route: "porder",
-          menu_url: "purchase/porder/index",
-          pid: "75",
-          is_show: "1",
-          is_private: "1",
-          menu_type: "2",
-          level: "2",
-          status: "1",
-          weight: "8",
-          action: ["001", "007"]
-        },
-        {
-          id: "77",
-          menu_name: "买入订单对账",
-          menu_img: "ep:add-location",
-          menu_route: "orderRecord",
-          menu_url: "purchase/orderRecord/index",
-          pid: "75",
-          is_show: "1",
-          is_private: "1",
-          menu_type: "2",
-          level: "2",
-          status: "1",
-          weight: "7",
-          action: ["001", "007", "006", "013", "014", "002", "038", "022"]
-        },
-        {
-          id: "78",
-          menu_name: "买入订单对账详情",
-          menu_img: "ep:add-location",
-          menu_route: "orderRecordDetail",
-          menu_url: "purchase/orderRecord/detail",
-          pid: "75",
-          is_show: "1",
-          is_private: "0",
-          menu_type: "2",
-          level: "2",
-          status: "1",
-          weight: "6",
-          action: ["007", "038", "039"]
-        },
-        {
-          id: "79",
-          menu_name: "买入付款",
-          menu_img: "ep:add-location",
-          menu_route: "purchPay",
-          menu_url: "purchase/purchPay/index",
-          pid: "75",
-          is_show: "1",
-          is_private: "1",
-          menu_type: "2",
-          level: "2",
-          status: "1",
-          weight: "5",
-          action: ["001", "007", "006", "002"]
-        },
-        {
-          id: "80",
-          menu_name: "买入付款详情",
-          menu_img: "ep:add-location",
-          menu_route: "purchPayDetail",
-          menu_url: "purchase/purchPay/detail",
-          pid: "75",
-          is_show: "1",
-          is_private: "0",
-          menu_type: "2",
-          level: "2",
-          status: "1",
-          weight: "4",
-          action: ["007", "039", "020"]
-        },
-        {
-          id: "82",
-          menu_name: "买入回票",
-          menu_img: "ep:add-location",
-          menu_route: "ticketReturn",
-          menu_url: "purchase/ticketReturn/index",
-          pid: "75",
-          is_show: "1",
-          is_private: "1",
-          menu_type: "2",
-          level: "2",
-          status: "1",
-          weight: "3",
-          action: ["001", "007", "017", "018", "019", "002", "006"]
-        },
-        {
-          id: "95",
-          menu_name: "买入回票详情",
-          menu_img: "ep:add-location",
-          menu_route: "ticketReturnDetail",
-          menu_url: "purchase/ticketReturn/detail",
-          pid: "75",
-          is_show: "1",
-          is_private: "0",
-          menu_type: "2",
-          level: "2",
-          status: "1",
-          weight: "2",
-          action: ["007", "021", "020"]
-        },
-        {
-          id: "131",
-          menu_name: "买入付款解除管理",
-          menu_img: "ep:add-location",
-          menu_route: "purchPayRelive",
-          menu_url: "purchase/purchPayRelive/index",
-          pid: "75",
-          is_show: "1",
-          is_private: "1",
-          menu_type: "2",
-          level: "2",
-          status: "1",
-          weight: "1",
-          action: ["001", "007", "002", "024"]
-        },
-        {
-          id: "132",
-          menu_name: "买入回票解除管理",
-          menu_img: "ep:add-location",
-          menu_route: "ticketReturnRelive",
-          menu_url: "purchase/ticketReturnRelive/index",
-          pid: "75",
-          is_show: "1",
-          is_private: "1",
-          menu_type: "2",
-          level: "2",
-          status: "1",
-          weight: "1",
-          action: ["001", "007", "002"]
-        },
-        {
-          id: "135",
-          menu_name: "买入付款解除详情",
-          menu_img: "ep:add-location",
-          menu_route: "purchPayReliveDetail",
-          menu_url: "purchase/purchPayRelive/detail",
-          pid: "75",
-          is_show: "1",
-          is_private: "0",
-          menu_type: "2",
-          level: "2",
-          status: "1",
-          weight: "1",
-          action: ["007", "020"]
-        },
-        {
-          id: "136",
-          menu_name: "买入回票解除详情",
-          menu_img: "ep:add-location",
-          menu_route: "ticketReturnReliveDetail",
-          menu_url: "purchase/ticketReturnRelive/detail",
-          pid: "75",
-          is_show: "1",
-          is_private: "0",
-          menu_type: "2",
-          level: "2",
-          status: "1",
-          weight: "1",
-          action: ["007", "020"]
-        },
-        {
-          id: "153",
-          menu_name: "买入回票查询",
-          menu_img: "ep:add-location",
-          menu_route: "buyInvoiceQuery",
-          menu_url: "purchase/buyInvoiceQuery/index",
-          pid: "75",
-          is_show: "1",
-          is_private: "0",
-          menu_type: "2",
-          level: "2",
-          status: "1",
-          weight: "1",
-          action: ["001"]
-        }
-      ]
-    },
-    {
-      id: "83",
-      menu_name: "销售回款开票",
-      menu_img: "ep:add-location",
-      menu_url: "",
-      menu_route: "InvoiceSales",
-      pid: "0",
-      is_show: "1",
-      is_private: "1",
-      menu_type: "1",
-      weight: "8",
-      child: [
-        {
-          id: "84",
-          menu_name: "发票申请管理",
-          menu_img: "ep:add-location",
-          menu_route: "invoiceApply",
-          menu_url: "InvoiceSales/invoiceApply/index",
-          pid: "83",
-          is_show: "1",
-          is_private: "1",
-          menu_type: "2",
-          level: "2",
-          status: "1",
-          weight: "10",
-          action: [
-            "001",
-            "007",
-            "002",
-            "027",
-            "028",
-            "026",
-            "010",
-            "040",
-            "005"
-          ]
-        },
-        {
-          id: "92",
-          menu_name: "发票申请详情",
-          menu_img: "ep:add-location",
-          menu_route: "invoiceApplyDetail",
-          menu_url: "InvoiceSales/invoiceApply/detail",
-          pid: "83",
-          is_show: "1",
-          is_private: "0",
-          menu_type: "2",
-          level: "2",
-          status: "1",
-          weight: "9",
-          action: ["007", "025"]
-        },
-        {
-          id: "85",
-          menu_name: "资金认领管理",
-          menu_img: "ep:add-location",
-          menu_route: "capitalClaim",
-          menu_url: "InvoiceSales/capitalClaim/index",
-          pid: "83",
-          is_show: "1",
-          is_private: "1",
-          menu_type: "2",
-          level: "2",
-          status: "1",
-          weight: "8",
-          action: ["001", "007", "002", "029", "030", "009", "034", "035"]
-        },
-        {
-          id: "140",
-          menu_name: "资金认领详情",
-          menu_img: "ep:add-location",
-          menu_route: "capitalDetail",
-          menu_url: "InvoiceSales/capitalClaim/detail",
-          pid: "83",
-          is_show: "1",
-          is_private: "0",
-          menu_type: "2",
-          level: "2",
-          status: "1",
-          weight: "8",
-          action: ["007", "025"]
-        },
-        {
-          id: "161",
-          menu_name: "导入资金详情",
-          menu_img: "ep:alarm-clock",
-          menu_route: "claimDetail",
-          menu_url: "InvoiceSales/capitalClaim/claim",
-          pid: "83",
-          is_show: "1",
-          is_private: "0",
-          menu_type: "2",
-          level: "2",
-          status: "1",
-          weight: "8",
-          action: ["002", "007"]
-        },
-        {
-          id: "87",
-          menu_name: "资金公海池",
-          menu_img: "ep:add-location",
-          menu_route: "capitalPool",
-          menu_url: "InvoiceSales/capitalPool/index",
-          pid: "83",
-          is_show: "1",
-          is_private: "1",
-          menu_type: "2",
-          level: "2",
-          status: "1",
-          weight: "7",
-          action: ["001", "007", "034", "035", "015", "016"]
-        },
-        {
-          id: "86",
-          menu_name: "确认单公海池",
-          menu_img: "ep:add-location",
-          menu_route: "sheetOrderPool",
-          menu_url: "InvoiceSales/sheetOrderPool/index",
-          pid: "83",
-          is_show: "1",
-          is_private: "1",
-          menu_type: "2",
-          level: "2",
-          status: "1",
-          weight: "6",
-          action: ["001", "007", "015", "016"]
-        },
-        {
-          id: "88",
-          menu_name: "发票公海池",
-          menu_img: "ep:add-location",
-          menu_route: "invoicePool",
-          menu_url: "InvoiceSales/invoicePool/index",
-          pid: "83",
-          is_show: "1",
-          is_private: "1",
-          menu_type: "2",
-          level: "2",
-          status: "1",
-          weight: "5",
-          action: ["001", "007"]
-        },
-        {
-          id: "89",
-          menu_name: "退票申请管理",
-          menu_img: "ep:aim",
-          menu_route: "returnTicket",
-          menu_url: "InvoiceSales/returnTicket/index",
-          pid: "83",
-          is_show: "1",
-          is_private: "1",
-          menu_type: "2",
-          level: "2",
-          status: "1",
-          weight: "4",
-          action: ["001", "007", "002"]
-        },
-        {
-          id: "103",
-          menu_name: "退款申请管理详情",
-          menu_img: "ep:add-location",
-          menu_route: "refundDetail",
-          menu_url: "InvoiceSales/refund/detail",
-          pid: "83",
-          is_show: "1",
-          is_private: "0",
-          menu_type: "2",
-          level: "2",
-          status: "1",
-          weight: "4",
-          action: ["007", "002", "025"]
-        },
-        {
-          id: "90",
-          menu_name: "退款申请管理",
-          menu_img: "ep:aim",
-          menu_route: "refund",
-          menu_url: "InvoiceSales/refund/index",
-          pid: "83",
-          is_show: "1",
-          is_private: "1",
-          menu_type: "2",
-          level: "2",
-          status: "1",
-          weight: "3",
-          action: ["001", "007", "002"]
-        },
-        {
-          id: "104",
-          menu_name: "退票申请管理详情",
-          menu_img: "ep:add-location",
-          menu_route: "returnTicketDetail",
-          menu_url: "InvoiceSales/returnTicket/detail",
-          pid: "83",
-          is_show: "1",
-          is_private: "0",
-          menu_type: "2",
-          level: "2",
-          status: "1",
-          weight: "3",
-          action: ["007", "025"]
-        },
-        {
-          id: "110",
-          menu_name: "红字发票信息表",
-          menu_img: "ep:add-location",
-          menu_route: "redInk",
-          menu_url: "redInk/index",
-          pid: "83",
-          is_show: "1",
-          is_private: "1",
-          menu_type: "2",
-          level: "2",
-          status: "1",
-          weight: "2",
-          action: ["001", "002", "005", "007"]
-        },
-        {
-          id: "155",
-          menu_name: "销售发票查询",
-          menu_img: "ep:add-location",
-          menu_route: "invoiceQuery",
-          menu_url: "InvoiceSales/invoiceQuery/index",
-          pid: "83",
-          is_show: "1",
-          is_private: "0",
-          menu_type: "2",
-          level: "2",
-          status: "1",
-          weight: "1",
-          action: ["001"]
-        }
-      ]
-    },
-    {
-      id: "142",
-      menu_name: "结算订单补录",
-      menu_img: "ep:add-location",
-      menu_url: "",
-      menu_route: "netOrderEnter",
-      pid: "0",
-      is_show: "1",
-      is_private: "1",
-      menu_type: "1",
-      weight: "7",
-      child: [
-        {
-          id: "143",
-          menu_name: "结算订单补录",
-          menu_img: "ep:add-location",
-          menu_route: "netOrderEnter",
-          menu_url: "netOrderEnter/netOrderEntry/index",
-          pid: "142",
-          is_show: "1",
-          is_private: "1",
-          menu_type: "2",
-          level: "2",
-          status: "1",
-          weight: "1",
-          action: ["001", "007"]
-        }
-      ]
-    },
-    {
-      id: "96",
-      menu_name: "销售开票类目设置",
-      menu_img: "ep:bicycle",
-      menu_url: "",
-      menu_route: "InvoiceSaleSettings",
-      pid: "0",
-      is_show: "1",
-      is_private: "1",
-      menu_type: "1",
-      weight: "6",
-      child: [
-        {
-          id: "97",
-          menu_name: "销售成本类目设置",
-          menu_img: "fa:arrow-circle-up",
-          menu_route: "commodityCost",
-          menu_url: "InvoiceSaleSettings/commodityCost/index",
-          pid: "96",
-          is_show: "1",
-          is_private: "1",
-          menu_type: "2",
-          level: "2",
-          status: "1",
-          weight: "1",
-          action: ["001", "007", "036", "037"]
-        },
-        {
-          id: "98",
-          menu_name: "咨询成交类目设置",
-          menu_img: "fa-solid:arrow-circle-up",
-          menu_route: "consultingCost",
-          menu_url: "InvoiceSaleSettings/consultingCost/index.vue",
-          pid: "96",
-          is_show: "1",
-          is_private: "1",
-          menu_type: "2",
-          level: "2",
-          status: "1",
-          weight: "1",
-          action: ["001", "007", "036", "037"]
-        },
-        {
-          id: "99",
-          menu_name: "销售成本类目设置详情",
-          menu_img: "fa-solid:arrow-circle-up",
-          menu_route: "commodityCostDetail",
-          menu_url: "commodityCost/detail",
-          pid: "96",
-          is_show: "1",
-          is_private: "0",
-          menu_type: "2",
-          level: "2",
-          status: "1",
-          weight: "1",
-          action: ["007", "005"]
-        },
-        {
-          id: "100",
-          menu_name: "咨询成本类目设置详情",
-          menu_img: "fa:arrow-circle-up",
-          menu_route: "consultingCostDetail",
-          menu_url: "consultingCost/detail",
-          pid: "96",
-          is_show: "1",
-          is_private: "0",
-          menu_type: "2",
-          level: "2",
-          status: "1",
-          weight: "1",
-          action: ["007", "005"]
-        }
-      ]
-    },
-    {
-      id: "62",
-      menu_name: "数据源",
-      menu_img: "ep:add-location",
-      menu_url: "",
-      menu_route: "search",
-      pid: "0",
-      is_show: "1",
-      is_private: "1",
-      menu_type: "1",
-      weight: "5",
-      child: [
-        {
-          id: "64",
-          menu_name: "数据源",
-          menu_img: "ep:add-location",
-          menu_route: "standBook",
-          menu_url: "search/standBook/index",
-          pid: "62",
-          is_show: "1",
-          is_private: "1",
-          menu_type: "2",
-          level: "1",
-          status: "1",
-          weight: "1",
-          action: ["001", "007"]
-        },
-        {
-          id: "106",
-          menu_name: "数据源详情",
-          menu_img: "ep:add-location",
-          menu_route: "standBookDetail",
-          menu_url: "search/standBook/detail",
-          pid: "62",
-          is_show: "1",
-          is_private: "0",
-          menu_type: "2",
-          level: "1",
-          status: "1",
-          weight: "1",
-          action: ["007"]
-        }
-      ]
-    },
-    {
-      id: "145",
-      menu_name: "台账报表",
-      menu_img: "ep:add-location",
-      menu_url: "",
-      menu_route: "reportForm",
-      pid: "0",
-      is_show: "1",
-      is_private: "1",
-      menu_type: "1",
-      weight: "4",
-      child: [
-        {
-          id: "146",
-          menu_name: "可申请报表",
-          menu_img: "ep:add-location",
-          menu_route: "reportApply",
-          menu_url: "reportForm/reportApply/index",
-          pid: "145",
-          is_show: "1",
-          is_private: "1",
-          menu_type: "2",
-          level: "2",
-          status: "1",
-          weight: "1",
-          action: ["001", "002", "004", "003"]
-        },
-        {
-          id: "147",
-          menu_name: "报表申请记录",
-          menu_img: "ep:add-location",
-          menu_route: "reportRecord",
-          menu_url: "reportForm/reportRecord/index",
-          pid: "145",
-          is_show: "1",
-          is_private: "1",
-          menu_type: "2",
-          level: "2",
-          status: "1",
-          weight: "1",
-          action: ["001", "002", "006"]
-        },
-        {
-          id: "162",
-          menu_name: "可申请报表(人事)",
-          menu_img: "ep:add-location",
-          menu_route: "personnelReport",
-          menu_url: "reportForm/personnelReport/index",
-          pid: "145",
-          is_show: "1",
-          is_private: "1",
-          menu_type: "2",
-          level: "1",
-          status: "1",
-          weight: "1",
-          action: ["001", "002", "003", "004"]
-        },
-        {
-          id: "163",
-          menu_name: "报表申请记录(人事)",
-          menu_img: "ep:add-location",
-          menu_route: "personnelReportRecord",
-          menu_url: "reportForm/personnelReportRecord/index",
-          pid: "145",
-          is_show: "1",
-          is_private: "1",
-          menu_type: "2",
-          level: "2",
-          status: "1",
-          weight: "1",
-          action: ["001", "002", "006"]
-        },
-        {
-          id: "175",
-          menu_name: "可申请报表(仓库)",
-          menu_img: "ep:add-location",
-          menu_route: "warehouseeReport",
-          menu_url: "reportForm/warehouseeReport/index",
-          pid: "145",
-          is_show: "1",
-          is_private: "1",
-          menu_type: "2",
-          level: "2",
-          status: "1",
-          weight: "1",
-          action: ["001", "002", "003", "004"]
-        },
-        {
-          id: "176",
-          menu_name: "报表申请记录(仓库)",
-          menu_img: "ep:add-location",
-          menu_route: "warehouseRecords",
-          menu_url: "reportForm/warehouseRecords/index",
-          pid: "145",
-          is_show: "1",
-          is_private: "1",
-          menu_type: "2",
-          level: "2",
-          status: "1",
-          weight: "1",
-          action: ["001", "002", "006"]
-        }
-      ]
-    },
-    {
-      id: "47",
-      menu_name: "业务参数",
-      menu_img: "ep:add-location",
-      menu_url: "",
-      menu_route: "parameter",
-      pid: "0",
-      is_show: "1",
-      is_private: "1",
-      menu_type: "1",
-      weight: "3",
-      child: [
-        {
-          id: "101",
-          menu_name: "公司标签管理",
-          menu_img: "ep:add-location",
-          menu_route: "tagManage",
-          menu_url: "tagManage/index",
-          pid: "47",
-          is_show: "1",
-          is_private: "1",
-          menu_type: "2",
-          level: "2",
-          status: "1",
-          weight: "98",
-          action: ["001", "002", "007", "005", "003", "004", "006"]
-        },
-        {
-          id: "73",
-          menu_name: "企业客户",
-          menu_img: "ep:add-location",
-          menu_route: "clients",
-          menu_url: "parameter/clients/index",
-          pid: "47",
-          is_show: "1",
-          is_private: "1",
-          menu_type: "2",
-          level: "0",
-          status: "1",
-          weight: "94",
-          action: ["001"]
-        },
-        {
-          id: "74",
-          menu_name: "企业客户发票",
-          menu_img: "ep:add-location",
-          menu_route: "invoiceheader",
-          menu_url: "parameter/invoiceheader/index",
-          pid: "47",
-          is_show: "1",
-          is_private: "1",
-          menu_type: "2",
-          level: "2",
-          status: "1",
-          weight: "93",
-          action: ["001", "002", "007", "004", "003", "006", "005"]
-        },
-        {
-          id: "156",
-          menu_name: "供应商",
-          menu_img: "ep:add-location",
-          menu_route: "supplierPay",
-          menu_url: "parameter/supplierPay/index",
-          pid: "47",
-          is_show: "1",
-          is_private: "1",
-          menu_type: "2",
-          level: "0",
-          status: "1",
-          weight: "1",
-          action: ["001"]
-        },
-        {
-          id: "157",
-          menu_name: "业务公司财务设置",
-          menu_img: "ep:add-location",
-          menu_route: "finance",
-          menu_url: "parameter/finance/index",
-          pid: "47",
-          is_show: "1",
-          is_private: "1",
-          menu_type: "2",
-          level: "0",
-          status: "1",
-          weight: "1",
-          action: ["001", "003", "004", "005", "007"]
-        }
-      ]
-    },
-    {
-      id: "1",
-      menu_name: "业务公司账号权限",
-      menu_img: "ep:aim",
-      menu_url: "",
-      menu_route: "interest",
-      pid: "0",
-      is_show: "1",
-      is_private: "1",
-      menu_type: "1",
-      weight: "2",
-      child: [
-        {
-          id: "124",
-          menu_name: "账号管理",
-          menu_img: "ep:add-location",
-          menu_route: "companyAccount",
-          menu_url: "interest/companyAccount/index",
-          pid: "1",
-          is_show: "1",
-          is_private: "1",
-          menu_type: "2",
-          level: "1",
-          status: "1",
-          weight: "9",
-          action: ["001", "007", "005", "003", "004", "012"]
-        },
-        {
-          id: "4",
-          menu_name: "角色管理",
-          menu_img: "ep:add-location",
-          menu_route: "role",
-          menu_url: "interest/role/index",
-          pid: "1",
-          is_show: "1",
-          is_private: "1",
-          menu_type: "2",
-          level: "1",
-          status: "1",
-          weight: "8",
-          action: ["001", "003", "004", "005", "007", "002"]
-        },
-        {
-          id: "125",
-          menu_name: "账号角色查询",
-          menu_img: "ep:add-location",
-          menu_route: "accountQuery",
-          menu_url: "interest/accountQuery/index",
-          pid: "1",
-          is_show: "1",
-          is_private: "1",
-          menu_type: "2",
-          level: "1",
-          status: "1",
-          weight: "7",
-          action: ["001", "007", "005", "003", "004"]
-        },
-        {
-          id: "5",
-          menu_name: "功能权限",
-          menu_img: "ep:add-location",
-          menu_route: "action",
-          menu_url: "interest/action/index",
-          pid: "1",
-          is_show: "1",
-          is_private: "1",
-          menu_type: "2",
-          level: "1",
-          status: "1",
-          weight: "1",
-          action: ["001", "008"]
-        }
-      ]
-    },
-    {
-      id: "150",
-      menu_name: "供应商账号权限",
-      menu_img: "ep:add-location",
-      menu_url: "",
-      menu_route: "supplierManage",
-      pid: "0",
-      is_show: "1",
-      is_private: "1",
-      menu_type: "1",
-      weight: "2",
-      child: [
-        {
-          id: "151",
-          menu_name: "账号管理",
-          menu_img: "ep:add-location",
-          menu_route: "supplierAccoutManage",
-          menu_url: "supplierManage/supplierAccoutManage/index",
-          pid: "150",
-          is_show: "1",
-          is_private: "1",
-          menu_type: "2",
-          level: "1",
-          status: "1",
-          weight: "1",
-          action: ["001", "002", "005", "007", "003", "004"]
-        },
-        {
-          id: "152",
-          menu_name: "账号角色查询",
-          menu_img: "ep:add-location",
-          menu_route: "supplierAccoutQuery",
-          menu_url: "supplierManage/supplierAccoutQuery/index",
-          pid: "150",
-          is_show: "1",
-          is_private: "1",
-          menu_type: "2",
-          level: "1",
-          status: "1",
-          weight: "1",
-          action: ["001", "007", "005"]
-        },
-        {
-          id: "160",
-          menu_name: "角色管理",
-          menu_img: "ep:add-location",
-          menu_route: "supplierRole",
-          menu_url: "supplierManage/supplierRole/index",
-          pid: "150",
-          is_show: "1",
-          is_private: "1",
-          menu_type: "2",
-          level: "1",
-          status: "1",
-          weight: "1",
-          action: ["001", "002", "005", "007"]
-        }
-      ]
-    },
     {
       id: "2",
       menu_name: "系统设置",

+ 6 - 5
src/api/user.ts

@@ -4,8 +4,8 @@ const { VITE_PROXY_DOMAIN_REAL, VITE_PROXY_USER_REAL } = loadEnv();
 const userAPi = VITE_PROXY_DOMAIN_REAL;
 const yewuApi = VITE_PROXY_USER_REAL + "/admin/";
 
-import menu_mock from "/@/api/menu_mock";
-
+// import menu_mock from "/@/api/menu_mock";
+import "./actions"
 interface userType extends Promise<any> {
   svg?: string;
   code?: number;
@@ -27,9 +27,10 @@ export function ddDetail(data) {
 }
 // 获取当前账号菜单数据
 export const getAsyncRoutes = async (data: object) => {
-  // const result = await http.request("post", `${yewuApi}role_action/menu`, { data })
-  // return result;
-  return menu_mock;
+  // /admin/action/query
+  // await http.request("post", `${yewuApi}action/query`, { data:{} })
+  const result = await http.request("post", `${yewuApi}role_action/menu`, { data })
+  return result;
 };
 
 // 刷新token

+ 7 - 7
src/components/PageContent/src/page-content.tsx

@@ -70,7 +70,7 @@ const PageContent = defineComponent({
     }
 
     /**
-     * 渲染需要的操作按钮 
+     * 渲染需要的操作按钮
      */
     function renderOperation(row) {
       const { contentConfig, powers } = props;
@@ -108,12 +108,12 @@ const PageContent = defineComponent({
         ? showStatus(isSuperUser.value)
         : action.status &&
         noAction &&
-        ((powers.some(i => i == "003") && row.status + "" === "0") ||
-          (powers.some(i => i == "004") && row.status + "" === "1"));
+        ((powers.some(i => i == "6") && row.status + "" === "0") ||
+          (powers.some(i => i == "7") && row.status + "" === "1"));
 
       return (
         <>
-          {!notPreview && view && noPerview && powers.some(i => i == "007") && (
+          {!notPreview && view && noPerview && powers.some(i => i == "5") && (
             <Operation.Preview
               isInv={inv}
               onPreview={() => emit("previewBtnClick", row)}
@@ -139,7 +139,7 @@ const PageContent = defineComponent({
             />
           )}
 
-          {action.update && powers.some(i => i == "005") && noAction && (
+          {action.update && powers.some(i => i == "4") && noAction && (
             <Operation.Update
               onUpdate={() => emit("updateBtnClick", row)}
               {...createActionProps("update", apis)}
@@ -157,7 +157,7 @@ const PageContent = defineComponent({
             />
           )}
 
-          {del && noAction && action.delete && powers.some(i => i == "006") && (
+          {del && noAction && action.delete && powers.some(i => i == "8") && (
             <Operation.Delete
               row={row}
               prop={contentConfig.deleteProp}
@@ -183,7 +183,7 @@ const PageContent = defineComponent({
 
       return (
         (slots.create && slots.create()) ||
-        (action.create && powers.some(i => i == "002") && (
+        (action.create && powers.some(i => i == "2") && (
           <Operation.Create
             {...createActionProps("create", contentConfig.apis)}
             onCreate={() => emit("createBtnClick")}

+ 8 - 7
src/router/utils.ts

@@ -128,20 +128,20 @@ function initRouter(data = {}) {
     useUserStoreHook()
       .postMenuList(data)
       .then(({ code, data }) => {
-        console.log(data);
-        if (code === 0) {
+        console.log(data, "----");
+        if (code === 1) {
           const arrag: Array<any> = [];
 
           data.forEach(e => {
-            const [icon] = e.menu_img.split("ep:");
+            const [icon] = e.menu_ico.split("ep:");
             const eitem = {
               path: `/${e.menu_route}`,
               component: Layout,
               redirect: `${e.menu_route}`,
               meta: {
                 icon,
-                title: `${e.menu_name}`,
-                showLink: e.is_private + "" === "1"
+                title: `${e.menu_name}`
+                // showLink: e.is_private + "" === "1"
               },
               children: []
             };
@@ -153,7 +153,7 @@ function initRouter(data = {}) {
                 //本地能使用,上生产直接GG
                 meta: {
                   icon: s.menu_img,
-                  showLink: s.is_private + "" === "1",
+                  // showLink: s.is_private + "" === "1",
                   title: `${s.menu_name} `
                 }
               };
@@ -218,6 +218,7 @@ function initRouter(data = {}) {
         }
       })
       .catch(err => {
+        console.log(err)
         reject(err);
       });
   });
@@ -308,7 +309,7 @@ function addAsyncRoutes(arrRoutes: Array<RouteRecordRaw>) {
       // 对后端传component组件路径和不传做兼容(如果后端传component组件路径,那么path可以随便写,如果不传,component组件路径会根path保持一致)
       const index = v?.component
         ? // @ts-expect-error
-        modulesRoutesKeys.findIndex(ev => ev.includes(v.component))
+          modulesRoutesKeys.findIndex(ev => ev.includes(v.component))
         : modulesRoutesKeys.findIndex(ev => ev.includes(v.path));
       v.component = modulesRoutes[modulesRoutesKeys[index]];
     }

+ 3 - 40
src/store/modules/user.ts

@@ -127,7 +127,6 @@ export const useUserStore = defineStore({
       this.info = data;
       if (Number(code) === 1) {
         const { level } = data;
-
         /** 没有设置过level  */
         if (this.level === "0" || !this.level) {
           this.level = level;
@@ -142,32 +141,6 @@ export const useUserStore = defineStore({
             return;
           }
         }
-        // const code = getRelaComNo();
-        // const index = this.companyList.findIndex(
-        //   ({ companyNo, companyCode }) =>
-        //     companyNo === code || companyCode === code
-        // );
-        //
-        // let _index = index >= 0 ? index : -1;
-        //
-        // if (_index === -1) {
-        //   _index = this.companyList.findIndex(
-        //     ({ is_main }) => String(is_main) === "1"
-        //   );
-        // }
-        //
-        // const currentCompany = !this.isSuperUser
-        //   ? this.companyList[_index === -1 ? 0 : _index]
-        //   : "";
-        //
-        // if (currentCompany && currentCompany.companyCode) {
-        //   currentCompany.companyNo = currentCompany.companyCode;
-        // }
-        //
-        // this.currentCompany = currentCompany;
-        // setRelaComName(currentCompany.companyName);
-        // setRelaComNo(currentCompany.companyNo);
-
         return data;
       } else {
         throw new Error(JSON.stringify({ code, message }));
@@ -186,17 +159,12 @@ export const useUserStore = defineStore({
     async postMenuList(form) {
       try {
         const userinfo = await this.requesetUserInfo();
-        // await this.requsetSystemInfo(); 请求系统更新
-
         return new Promise((resolve, reject) => {
           getAsyncRoutes({
             role_id: userinfo.role_id
           })
             .then((res: resType) => {
               const { code, data, message } = res;
-
-              const { id } = this.info;
-
               if (message === "账户已禁用") {
                 removeMenus();
                 reject(10000);
@@ -206,12 +174,12 @@ export const useUserStore = defineStore({
 
               const actionList: Array<any> = [];
               switch (Number(code)) {
-                case 0:
+                case 1:
                   data.forEach(e => {
                     e.child?.forEach(s => {
                       const item = {
                         menu_route: s.menu_route,
-                        action: s.action
+                        action: s.child.map(({ action_id }) => String(action_id))
                       };
                       actionList.push(item);
                     });
@@ -240,11 +208,6 @@ export const useUserStore = defineStore({
           if (!(Number(code) >= 100 && Number(code) <= 104)) {
             ElMessage.error(message);
           }
-
-          // if (code === "userExcption") {
-          //   trigger("userExcption");
-          //   return;
-          // }
         }
 
         window.location.hash = "login";
@@ -287,7 +250,7 @@ export const useUserStore = defineStore({
 });
 
 export async function initalUser() {
-  return useUserStore().requesetUserInfo
+  return useUserStore().requesetUserInfo;
 }
 
 export function useUserStoreHook() {

+ 1 - 1
src/views/system/accountRole/index.vue

@@ -8,7 +8,7 @@ import { httpSetRole } from "/@/api/system/account";
 import { useAsync } from "/@/hooks/core/useAsync";
 import { ModalTypes } from "./types";
 
-const PageName = "accountQuery";
+const PageName = "accountRole";
 const roleModalRef = ref<InstanceType<typeof RoleModal> | null>(null);
 const instance = ref(null);
 

+ 12 - 6
src/views/system/action/index.vue

@@ -17,6 +17,7 @@ const { logout } = useNav();
 defineOptions({
   name: "Account"
 });
+
 const powers = ref([]);
 const form = reactive({
   action_name: "",
@@ -131,14 +132,14 @@ const resetForm = (formEl: FormInstance | undefined) => {
 };
 
 onMounted(() => {
-  powers.value = useUserStoreHook().getMenuActions("account");
+  powers.value = useUserStoreHook().getMenuActions("action");
   onSearch();
 });
 </script>
 
 <template>
   <div class="main">
-    <div v-show="powers.some(i => i == '001')">
+    <div v-show="powers.some(i => i == '3')">
       <el-form
         ref="formRef"
         :model="form"
@@ -204,6 +205,7 @@ onMounted(() => {
       >
         <template #buttons>
           <el-button
+            v-if="powers.includes('2')"
             type="primary"
             size="small"
             :icon="useRenderIcon('add')"
@@ -232,7 +234,7 @@ onMounted(() => {
             <template #operation="{ row }">
               <el-button
                 class="reset-margin"
-                v-if="powers.some(i => i == '007')"
+                v-if="powers.some(i => i == '5')"
                 link
                 type="primary"
                 size="small"
@@ -242,7 +244,7 @@ onMounted(() => {
               <el-button
                 class="reset-margin"
                 link
-                v-if="powers.some(i => i == '005')"
+                v-if="powers.some(i => i == '4')"
                 type="primary"
                 size="small"
                 @click="editItem(row.id, 'edit', row)"
@@ -254,7 +256,7 @@ onMounted(() => {
               >
                 <template #reference>
                   <el-button
-                    v-if="powers.some(i => i == '012')"
+                    v-if="powers.some(i => i == '8')"
                     class="reset-margin"
                     link
                     type="primary"
@@ -267,6 +269,10 @@ onMounted(() => {
                 :title="
                   String(row.status) === '1' ? '改为禁用?' : '改为启用?'
                 "
+                v-if="
+                  (powers.some(i => i == '7') && row.status + '' === '1') ||
+                  (powers.some(i => i == '6') && row.status + '' === '0')
+                "
                 @confirm="handleStatus(row)"
               >
                 <template #reference>
@@ -296,7 +302,7 @@ onMounted(() => {
         :sitem="sitem"
       />
     </div>
-    <NoAuth v-show="!powers.some(i => i == '001')" />
+    <NoAuth v-show="!powers.some(i => i == '3')" />
   </div>
 </template>
 

+ 1 - 82
src/views/system/actionSet/index.vue

@@ -266,31 +266,8 @@ let indeterminateCheck = computed(() => {
   };
 });
 
-let indeterminateField = computed(() => {
-  return item => {
-    // console.log(item);
-    // 选中子节点的数量
-    const selectItemLength = item.child.filter(
-      filitem =>
-        item.fieldList.findIndex(
-          finditem => String(finditem) === String(filitem.id)
-        ) > -1
-    ).length;
-    // 未选中子节点的数量
-    const noSlectItemLength = item.child.filter(
-      filitem =>
-        item.fieldList.findIndex(
-          finditem => String(finditem) === String(filitem.id)
-        ) == -1
-    ).length;
-    // // 当前节点的index
-    // 存在选中子节点且存在未选中子节点为中间态
-    return selectItemLength > 0 && noSlectItemLength > 0;
-  };
-});
-
 onMounted(() => {
-  // powers.value = useUserStoreHook().getMenuActions("action");
+  powers.value = useUserStoreHook().getMenuActions("actionSet");
   onSearch();
 });
 </script>
@@ -437,64 +414,6 @@ onMounted(() => {
                             </el-checkbox-group>
                           </div>
                         </div>
-                        <!--                        <div-->
-                        <!--                          class="sfield"-->
-                        <!--                          v-if="-->
-                        <!--                            subItem.child &&-->
-                        <!--                            subItem.child.length > 0-->
-                        <!--                          "-->
-                        <!--                        >-->
-                        <!--                          <div class="checkAll">-->
-                        <!--                            <el-checkbox-->
-                        <!--                              size="small"-->
-                        <!--                              v-model="subItem.fieldAll"-->
-                        <!--                              :disabled="editType === 'view'"-->
-                        <!--                              :indeterminate="indeterminateField(subItem)"-->
-                        <!--                              @change="-->
-                        <!--                                handleFieldAllChange(-->
-                        <!--                                  $event,-->
-                        <!--                                  index,-->
-                        <!--                                  item,-->
-                        <!--                                  subIndex-->
-                        <!--                                )-->
-                        <!--                              "-->
-                        <!--                              >字段全选</el-checkbox-->
-                        <!--                            >-->
-                        <!--                          </div>-->
-                        <!--                          <div class="checkItem">-->
-                        <!--                            <el-checkbox-group-->
-                        <!--                              v-model="subItem.fieldList"-->
-                        <!--                              size="small"-->
-                        <!--                              :disabled="editType === 'view'"-->
-                        <!--                              @change="-->
-                        <!--                                handleFieldGroupChange(-->
-                        <!--                                  $event,-->
-                        <!--                                  index,-->
-                        <!--                                  item,-->
-                        <!--                                  subIndex-->
-                        <!--                                )-->
-                        <!--                              "-->
-                        <!--                            >-->
-                        <!--                              <el-checkbox-->
-                        <!--                                v-for="children in subItem.child"-->
-                        <!--                                :key="'FieldItem' + children.id"-->
-                        <!--                                :label="children.id"-->
-                        <!--                                size="small"-->
-                        <!--                                :disabled="editType === 'view'"-->
-                        <!--                                @change="-->
-                        <!--                                  handleFieldChange(-->
-                        <!--                                    $event,-->
-                        <!--                                    children.id,-->
-                        <!--                                    index,-->
-                        <!--                                    subIndex,-->
-                        <!--                                    item-->
-                        <!--                                  )-->
-                        <!--                                "-->
-                        <!--                                >{{ children.field_name }}</el-checkbox-->
-                        <!--                              >-->
-                        <!--                            </el-checkbox-group>-->
-                        <!--                          </div>-->
-                        <!--                        </div>-->
                       </template>
                     </div>
                   </div>

+ 6 - 6
src/views/system/menuOperator/components/action-table.vue

@@ -110,7 +110,7 @@ defineExpose({
     >
       <template #buttons>
         <el-button
-          v-if="powers.some(i => i == '002')"
+          v-if="powers.some(i => i == '2')"
           type="primary"
           size="small"
           :icon="useRenderIcon('add')"
@@ -140,7 +140,7 @@ defineExpose({
             <el-button
               class="reset-margin"
               link
-              v-if="powers.some(i => i == '007')"
+              v-if="powers.some(i => i == '5')"
               type="primary"
               :size="size"
               @click="editItem(row, row.id, 'view')"
@@ -151,15 +151,15 @@ defineExpose({
               link
               type="primary"
               :size="size"
-              v-if="powers.some(i => i == '005')"
+              v-if="powers.some(i => i == '4')"
               @click="editItem(row, row.id, 'edit')"
               :icon="useRenderIcon('edits')"
             />
             <el-popconfirm
               :title="row.status === '1' ? '改为禁用?' : '改为启用?'"
               v-if="
-                (powers.some(i => i == '004') && row.status + '' === '1') ||
-                (powers.some(i => i == '003') && row.status + '' === '0')
+                (powers.some(i => i == '7') && row.status + '' === '1') ||
+                (powers.some(i => i == '6') && row.status + '' === '0')
               "
               @confirm="handleStatus(row)"
             >
@@ -180,7 +180,7 @@ defineExpose({
             ></el-popconfirm>
             <el-popconfirm
               title="是否确认删除?"
-              v-if="powers.some(i => i == '006')"
+              v-if="powers.some(i => i == '8')"
               @confirm="handleDelete(row)"
             >
               <template #reference>

+ 3 - 2
src/views/system/menuOperator/index.vue

@@ -14,6 +14,7 @@ function handleAddChangeCheck(item: any, id: string, type: string) {
 
 function handleReload({ data }) {
   const { pid } = data || {};
+
   Number(pid) === 0
     ? actionTableRef.value.onSearch()
     : actionTableRef.value.reloadTree(pid);
@@ -21,7 +22,7 @@ function handleReload({ data }) {
 
 onMounted(() => {
   powers.value = useUserStoreHook().getMenuActions("menuOperator");
-  if (powers.value.some(i => i == "001")) {
+  if (powers.value.some(i => i == "3")) {
     actionTableRef.value.onSearch();
   }
 });
@@ -29,7 +30,7 @@ onMounted(() => {
 
 <template>
   <div class="main">
-    <PagePower :isShow="powers.some(i => i == '001')">
+    <PagePower :isShow="powers.some(i => i == '3')">
       <ActionTable
         :powers="powers"
         showOverflowTooltip

+ 11 - 5
src/views/system/role/index.vue

@@ -135,7 +135,7 @@ watch(
 
 <template>
   <div class="main role">
-    <div v-show="powers.some(i => i == '001')">
+    <div v-show="powers.some(i => i == '3')">
       <el-form
         ref="formRef"
         :inline="true"
@@ -219,7 +219,7 @@ watch(
                 class="reset-margin"
                 link
                 type="primary"
-                v-if="powers.some(i => i == '007')"
+                v-if="powers.some(i => i == '5')"
                 :size="size"
                 @click="editItem(row.id, 'view')"
                 :icon="useRenderIcon('eye-view')"
@@ -229,12 +229,18 @@ watch(
                 link
                 type="primary"
                 :size="size"
-                v-if="powers.some(i => i == '005')"
+                v-if="powers.some(i => i == '4')"
                 @click="editItem(row.id, 'edit')"
                 :icon="useRenderIcon('edits')"
               />
               <el-popconfirm
-                :title="String(row.status) === '1' ? '改为禁用?' : '改为启用?'"
+                :title="
+                  String(row.status) === '1' ? '改为禁用?' : '改为启用?'
+                "
+                v-if="
+                  (powers.some(i => i == '7') && row.status + '' === '1') ||
+                  (powers.some(i => i == '6') && row.status + '' === '0')
+                "
                 @confirm="handleStatus(row)"
               >
                 <template #reference>
@@ -263,7 +269,7 @@ watch(
         @cancel="submitCancel"
       />
     </div>
-    <NoAuth v-show="!powers.some(i => i == '001')" />
+    <NoAuth v-show="!powers.some(i => i == '3')" />
   </div>
 </template>
 

+ 9 - 3
src/views/system/setBtn/index.vue

@@ -8,9 +8,11 @@ import modalConfig from "./config/modal.config";
 import { IMenuTree } from "./types";
 
 import { httpActionAll } from "/@/api/system/setBtn";
+import { useUserStoreHook } from "/@/store/modules/user";
 
 const menuid = ref("");
 const pageContentRef = ref<PageContentInstance>(null);
+const powers = ref([]);
 
 const config = ref(modalConfig);
 
@@ -45,9 +47,13 @@ function initTableData(id: string) {
 }
 
 onMounted(async () => {
-  const { code, data } = await httpActionAll({ status: "1"});
+  const { code, data } = await httpActionAll({ status: "1" });
+  powers.value = useUserStoreHook().getMenuActions("setBtn");
   if (code === 1) {
-    const options = data.map(({ action_name, id }) => ({ label: action_name, value: id }));
+    const options = data.map(({ action_name, id }) => ({
+      label: action_name,
+      value: id
+    }));
     config.value.formItems[0].options = options;
   }
 });
@@ -62,7 +68,7 @@ onMounted(async () => {
       />
       <PageContent
         ref="pageContentRef"
-        :powers="['002', '003', '004', '006']"
+        :powers="powers"
         :content-config="contentConfig"
         @create-btn-click="handleCreateData"
         @preview-btn-click="handlePreviewData"